Changeset 443 for trunk/kernel/kern/thread.h
- Timestamp:
- May 16, 2018, 4:15:22 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/kern/thread.h
r440 r443 77 77 78 78 /*************************************************************************************** 79 * This defines the masks associated to the blocking causes.79 * This defines the thread blocking causes bit-vector. 80 80 **************************************************************************************/ 81 81 … … 278 278 279 279 /*************************************************************************************** 280 * This function is called by the kernel_init() function to initialize the IDLE thread .281 * It initializes an existing threaddescriptor from arguments values.280 * This function is called by the kernel_init() function to initialize the IDLE thread 281 * descriptor from arguments values. 282 282 * The THREAD_BLOCKED_GLOBAL bit is set, and the thread must be activated to start. 283 283 *************************************************************************************** … … 296 296 297 297 /*************************************************************************************** 298 * This function releases the physical memory allocated for a thread in a given cluster. 299 * This include the thread descriptor itself, the associated CPU and FPU context, and 300 * the physical memory allocated for an user thread local stack. 298 * This function is called by the sched_handle_signals() function to releases 299 * the physical memory allocated for a thread in a given cluster, when this thread 300 * is marked for delete. This include the thread descriptor itself, the associated 301 * CPU and FPU context, and the physical memory allocated for an user thread local stack. 302 * The destroyed thread is removed from the local process th_tbl[] array, and returns 303 * true when the destroyed thread was the last thread registered in process. 301 304 *************************************************************************************** 302 305 * @ thread : pointer on the thread descriptor to release. 303 **************************************************************************************/ 304 void thread_destroy( thread_t * thread ); 306 * @ return true, if the thread was the last registerd thread in local process. 307 **************************************************************************************/ 308 bool_t thread_destroy( thread_t * thread ); 305 309 306 310 /*************************************************************************************** 307 311 * This function defines the code of the thread executed by all cores after kernel_init, 308 312 * or when no other thread is runnable for a given core. 309 * 310 * TODO: In the TSAR architecture, it enters an infinite loop, in wich it forces 311 * the core in sleep (low-power) mode. Any IRQ will force the core to exit this sleep 312 * mode, but no ISR is executed. 313 * TODO: We must analyse if we have the same behaviour for I86 architectures... 313 * It enter and infinite loop in wich: 314 * - it unmask the IRQs 315 * - it optionally calls the hal_core_sleep() function to reduce the power consumption 316 * (this behavior is controlled by the CONFIG_THREAD_IDLE_MODE_SLEEP flag). 317 * - it call the sched_yield() function to find another runnable thread. 318 * 319 * TODO: In the TSAR architecture the hal_core_sleep() function forces the core to 320 * low-power mode. Any IRQ will force the core to exit this low-power mode, but no ISR 321 * is executed. We must analyse if we have the same behaviour for I86 architectures... 314 322 **************************************************************************************/ 315 323 void thread_idle_func(); … … 357 365 /*************************************************************************************** 358 366 * This function is used by the four sys_thread_cancel(), sys_thread_exit(), 359 * sys_kill() and sys_exit() system calls to delete a given thread.367 * sys_kill() and sys_exit() system calls to mark for delete a given thread. 360 368 * It set the THREAD_BLOCKED_GLOBAL bit and set the the THREAD_FLAG_REQ_DELETE bit 361 369 * in the thread descriptor identified by the <thread_xp> argument, to ask the scheduler
Note: See TracChangeset
for help on using the changeset viewer.