Changeset 408 for trunk/kernel/kern/scheduler.h
- Timestamp:
- Dec 5, 2017, 4:20:07 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/kern/scheduler.h
r407 r408 74 74 75 75 /********************************************************************************************* 76 * This function handles pending signals for all registered threads, and calls the 77 * sched_select() function to make a context switch for the core running the calling thread. 76 * This function is the only method to make a context switch. It is called in cas of TICK, 77 * or when when a thread explicitely requires a scheduling. 78 * It handles the pending signals for all threads attached to the core running the calling 79 * thread, and calls the sched_select() function to select a new thread. 80 * The cause argument is only used for debug by the sched_display() function, and 81 * indicates the scheduling cause. 82 ********************************************************************************************* 83 * @ cause : character string defining the scheduling cause. 78 84 ********************************************************************************************/ 79 void sched_yield( );85 void sched_yield( char * cause ); 80 86 81 87 /********************************************************************************************* … … 101 107 /********************************************************************************************* 102 108 * This function does NOT modify the scheduler state. 103 * It just select a thread in the list of attached threads, implementing the following policy: 104 * 1) it scan the list of kernel threads, from the next thread after the last executed one, 105 * and returns the first runnable found (can be the current thread). 106 * 2) if no kernel thread found, it scan the list of user thread, from the next thread after 107 * the last executed one, and returns the first runable found (can be the current thread). 108 * 3) if no runable thread found, it returns the idle thread. 109 * It just select a thread in the list of attached threads, implementing the following 110 * three steps policy: 111 * 1) It scan the list of kernel threads, from the next thread after the last executed one, 112 * and returns the first runnable found : not IDLE, not blocked, client queue not empty. 113 * It can be the current thread. 114 * 2) If no kernel thread found, it scan the list of user thread, from the next thread after 115 * the last executed one, and returns the first runable found : not blocked. 116 * It can be the current thread. 117 * 3) If no runable thread found, it returns the idle thread. 109 118 ********************************************************************************************* 110 * @ core : local pointer on the core descriptor.119 * @ core : local pointer on scheduler. 111 120 * @ returns pointer on selected thread descriptor 112 121 ********************************************************************************************/ 113 struct thread_s * sched_select( struct core_s * core);122 struct thread_s * sched_select( struct scheduler_s * sched ); 114 123 115 124 /*********************************************************************************************
Note: See TracChangeset
for help on using the changeset viewer.