Changeset 14 for trunk/kernel/kern/thread.h
- Timestamp:
- May 3, 2017, 1:23:24 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/kern/thread.h
r5 r14 158 158 core_t * core; /*! pointer to the owner core */ 159 159 process_t * process; /*! pointer on local process descriptor */ 160 page_t * page; /*! pointer on page desc. containing thread */161 160 162 161 uint32_t local_locks; /*! number of local locks owned by thread */ … … 266 265 /*************************************************************************************** 267 266 * This function allocates memory for a kernel thread descriptor in the local cluster, 268 * and initialise it from arguments values. 267 * and initialise it from arguments values, calling the thread_kernel_init() function, 268 * that also allocates and initializes the CPU context. 269 269 * The THREAD_BLOCKED_GLOBAL bit is set, and the thread must be activated to start. 270 270 *************************************************************************************** … … 283 283 284 284 /*************************************************************************************** 285 * This function initialises an existing kernel thread descriptor from arguments values. 286 * The THREAD_BLOCKED_GLOBAL bit is set, and the thread must be activated to start. 287 *************************************************************************************** 288 * @ thread : pointer on existing thread descriptor. 289 * @ type : kernel thread type. 290 * @ func : pointer on function. 291 * @ args : function arguments. 292 * @ core_lid : local core index. 293 * @ returns 0 if success / returns EINVAL if error 294 **************************************************************************************/ 295 error_t thread_kernel_init( thread_t * thread, 296 thread_type_t type, 297 void * func, 298 void * args, 299 lid_t core_lid ); 300 301 /*************************************************************************************** 285 302 * This function releases the physical memory allocated for a thread descriptor 286 303 * in the local cluster. It can be used for both an user and a kernel thread. … … 293 310 294 311 /*************************************************************************************** 295 * This function defines the code of the thread executed when no other thread is 296 * runnable for a given core. It try to force the core to the low-power state. 297 **************************************************************************************/ 298 void * thread_idle_func(); 312 * This function defines the code of the thread executed by all cores after kernel_init, 313 * or when no other thread is runnable for a given core. 314 * 315 * TODO: In the TSAR architecture, it enters an infinite loop, in wich it forces 316 * the core in sleep (low-power) mode. Any IRQ will force the core to exit this sleep 317 * mode, but no ISR is executed. 318 * TODO: We must analyse if we have the same behaviour for I86 architectures... 319 **************************************************************************************/ 320 void thread_idle_func(); 299 321 300 322 /***************************************************************************************
Note: See TracChangeset
for help on using the changeset viewer.