Split Yield and Preempt into separate scheduling functions.
This switch makes the logic for each much easier to parse.
This commit is contained in:
parent
3fee5ac9d7
commit
b58186265e
3 changed files with 54 additions and 31 deletions
|
|
@ -12,6 +12,13 @@ void InitScheduler();
|
|||
// Enables the scheduler such that processes will yield on ticks.
|
||||
void EnableScheduler();
|
||||
|
||||
// Preempts the current thread and flags it as runnable in the queue.
|
||||
// Generally used by the timer to move to the next timeslice.
|
||||
void Preempt();
|
||||
|
||||
// Current thread yields and is not rescheduled until some external process
|
||||
// adds it.
|
||||
// Used when a thread blocks or exits.
|
||||
void Yield();
|
||||
|
||||
// Scheduler will take ownership
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue