Changeset 296 for trunk/kernel/kern/scheduler.h
- Timestamp:
- Jul 31, 2017, 1:59:52 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/kern/scheduler.h
r279 r296 36 36 /********************************************************************************************* 37 37 * This structure define the scheduler associated to a given core. 38 * WARNING : the idle thread is executed when there is no runable thread in the list39 * of attached threads, but is NOT part of the list of attached threads.40 38 ********************************************************************************************/ 41 39 … … 78 76 * This function handles pending signals for all registered threads, and tries to make 79 77 * a context switch for the core running the calling thread. 80 * - If there is a runable thread (other than the current thread or the idle thread), 81 * the calling thread is descheduled, but its state is not modified. 78 * - If the <next> argument is not NULL, this next thread starts execution. 79 * - If <next> is NULL, it calls the sched_select() function. If there is a runable thread 80 * (other than current thread or idle thread), this selected thread starts execution. 82 81 * - If there is no other runable thread, the calling thread continues execution. 83 82 * - If there is no runable thread, the idle thread is executed. 83 ********************************************************************************************* 84 * @ next : local pointer on next thread to run / call sched_select() if NULL. 84 85 ********************************************************************************************/ 85 void sched_yield(); 86 87 /********************************************************************************************* 88 * This function handles pending signals for all registered threads, and make 89 * a context switch to the thread defined by the <thread> argument. 90 * If the selected thread is not attached to the same core as the calling thread, 91 * or is blocked, it causes a kernel panic. 92 ********************************************************************************************* 93 * @ new : local pointer on the thread to run. 94 ********************************************************************************************/ 95 void sched_switch_to( struct thread_s * new ); 86 void sched_yield( struct thread_s * next ); 96 87 97 88 /********************************************************************************************* … … 130 121 131 122 /********************************************************************************************* 132 * This function scan the list of kernel threads to find an idle (blocked) RPC thread. 133 ********************************************************************************************* 134 * @ core : local pointer on the core descriptor. 135 * @ returns pointer on RPC thread descriptor / returns NULL if no idle RPC thread. 123 * This function display the internal state of the calling core scheduler. 136 124 ********************************************************************************************/ 137 struct thread_s * sched_get_rpc_thead( struct core_s * core ); 138 125 void sched_display(); 139 126 140 127
Note: See TracChangeset
for help on using the changeset viewer.