forked from Bananymous/banan-os
Kernel: optimize yielding
Doing a yield no longer raises a software interrupt. Instead it just saves all the callee saved registers, ip, sp and return value. Because yield is only called in the kernel, it can just restore registers and jump to the target address. There is never a need to use iret :)
This commit is contained in:
@@ -57,7 +57,7 @@ namespace Kernel
|
||||
static BAN::ErrorOr<Scheduler*> create();
|
||||
BAN::ErrorOr<void> initialize();
|
||||
|
||||
void reschedule(InterruptStack*, InterruptRegisters*);
|
||||
void reschedule(YieldRegisters*);
|
||||
void reschedule_if_idle();
|
||||
|
||||
void timer_interrupt();
|
||||
|
||||
Reference in New Issue
Block a user