Schedule on PIC timer raise.

This causes a page fault because we don't properly handle the sleep
case.
This commit is contained in:
Drew Galbraith 2023-05-29 22:32:50 -07:00
parent 496dfeaef9
commit 656687b183
2 changed files with 12 additions and 1 deletions

View file

@ -4,6 +4,7 @@
#include "common/port.h"
#include "debug/debug.h"
#include "scheduler/scheduler.h"
#define IDT_INTERRUPT_GATE 0x8E
@ -122,6 +123,7 @@ extern "C" void interrupt_timer(InterruptFrame*) {
dbgln("timer: %us", cnt * 50 / 1000);
}
outb(PIC1_COMMAND, PIC_EOI);
sched::Yield();
}
void EnablePic() {