Changeset 409 for trunk/kernel/kern/scheduler.h
- Timestamp:
- Dec 20, 2017, 4:51:09 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/kern/scheduler.h
r408 r409 49 49 struct thread_s * idle; /*! pointer on idle thread */ 50 50 struct thread_s * current; /*! pointer on current running thread */ 51 bool_t sig_pending; /*! signal_handller must be called when true */ 51 52 } 52 53 scheduler_t; … … 66 67 struct thread_s * thread ); 67 68 68 /********************************************************************************************* 69 * This function removes a thread from the set of threads attached to a given core.69 /********************************************************************************************* 70 * This function remove a thread from its scheduler.re scheduler. 70 71 ********************************************************************************************* 71 72 * @ thread : local pointer on the thread descriptor. … … 87 88 /********************************************************************************************* 88 89 * This function scan all threads attached to a given core scheduler, and executes 89 * the relevant actions for pending signals, such as the THREAD_SIG_KILL signal. 90 * the relevant actions for pending KILL or EXIT signals. 91 * It is called in by the sched_yield() function, with IRQ disabled. 90 92 ********************************************************************************************* 91 93 * @ core : local pointer on the core descriptor. 92 94 ********************************************************************************************/ 93 95 void sched_handle_signals( struct core_s * core ); 94 95 /*********************************************************************************************96 * This function is used by the scheduler of a given core to actually kill a thread that has97 * the SIG_KILL / SIG_SUICIDE signal set (following a thread_exit() or a thread_kill() event).98 * - It checks that the thread has released all locks => panic otherwise...99 * - It removes the thread from the scheduler.100 * - It reset the SIG_KILL signal to acknoledge the killer.101 * - In case of SIG_SUCIDE, it removes the detached thread from its process, and destroys it.102 *********************************************************************************************103 * @ thread : local pointer on the thread descriptor.104 ********************************************************************************************/105 void sched_kill_thread( struct thread_s * thread );106 96 107 97 /********************************************************************************************* … … 123 113 124 114 /********************************************************************************************* 115 * This function unlink a thread identified by the <thread> pointer from its process. 116 * It is called by the sched_handle_signals() function when one EXIT or KILL signal is set, 117 * and it implement the first step of a thread destructionebut can also be directly called by a local killer thread signal. 118 * - It detach the thread from the scheduler. 119 * - It detach the thread from the process. 120 * - It detach the thread from the parent thread when the thread is attached. 121 * - It destroys the thread descriptor. 122 * - It acknowledge the killer thread if it's a kill signal 123 ********************************************************************************************* 124 * @ thread : pointer on thread to be killed. 125 ********************************************************************************************/ 126 void sched_kill_thread( struct thread_s * thread ); 127 128 /********************************************************************************************* 125 129 * This function display the internal state of the local core identified by its <lid>. 126 130 *********************************************************************************************
Note: See TracChangeset
for help on using the changeset viewer.