1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 05:37:43 +00:00

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
parent 6304c771dd
commit 39d2fcbbee
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(