Kernel processes / multitasking
This commit is contained in:
@ -10,6 +10,7 @@
|
||||
#include "pic.h"
|
||||
#include "apic.h"
|
||||
#include "pit.h"
|
||||
#include "proc/proc.h"
|
||||
|
||||
void hal_intr_disable(void) {
|
||||
asm volatile("cli");
|
||||
@ -151,7 +152,7 @@ void intr_dumpframe(IntrStackFrame *frame) {
|
||||
void intr_handleintr(IntrStackFrame *frame) {
|
||||
if (frame->trapnum >= 0 && frame->trapnum <= 31) {
|
||||
// EXCEPTION
|
||||
kprintf_unsafe("ERROR", "%s, 0x%lX\n", exceptions[frame->trapnum], frame->errnum);
|
||||
kprintf_unsafe("ERROR %s, 0x%lX\n", exceptions[frame->trapnum], frame->errnum);
|
||||
intr_dumpframe(frame);
|
||||
hal_hang();
|
||||
} else if (frame->trapnum >= 32 && frame->trapnum <= 47) {
|
||||
@ -161,6 +162,8 @@ void intr_handleintr(IntrStackFrame *frame) {
|
||||
}
|
||||
io_out8(PIC1_CMD, 0x20);
|
||||
lapic_write(LAPIC_EOI, 0x00);
|
||||
|
||||
proc_sched((void *)frame);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user