Move the scheduler code to its own class.

This is very mechanical.
This commit is contained in:
Andreas Kling 2018-11-07 22:15:02 +01:00
commit 39d2fcbbee
Notes: sideshowbarker 2024-07-19 18:32:14 +09:00
8 changed files with 336 additions and 318 deletions

View file

@ -5,6 +5,7 @@
#include "Process.h"
#include "system.h"
#include "PIC.h"
#include "Scheduler.h"
#define IRQ_TIMER 0
@ -103,9 +104,9 @@ void clock_handle()
current->tss().esp = regs.esp_if_crossRing;
}
if (!scheduleNewProcess())
if (!Scheduler::pick_next())
return;
Process::prepare_for_iret_to_new_process();
Scheduler::prepare_for_iret_to_new_process();
// Set the NT (nested task) flag.
asm(