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

@ -2,6 +2,7 @@
#include "Process.h"
#include "Syscall.h"
#include "Console.h"
#include "Scheduler.h"
extern "C" void syscall_entry(RegisterDump&);
extern "C" void syscall_ISR();
@ -48,7 +49,7 @@ static DWORD handle(RegisterDump& regs, DWORD function, DWORD arg1, DWORD arg2,
ASSERT_INTERRUPTS_ENABLED();
switch (function) {
case Syscall::SC_yield:
sched_yield();
Scheduler::yield();
break;
case Syscall::SC_putch:
Console::the().putChar(arg1 & 0xff);