diff options
-rw-r--r-- | src/kernel/arch/i386/interrupts/isr.c | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/src/kernel/arch/i386/interrupts/isr.c b/src/kernel/arch/i386/interrupts/isr.c index 6701d58..9d8bb6c 100644 --- a/src/kernel/arch/i386/interrupts/isr.c +++ b/src/kernel/arch/i386/interrupts/isr.c @@ -7,34 +7,18 @@ bool isr_test_interrupt_called = false; -/** Kills the process that caused the exception */ -_Noreturn static void exception_finish(void) { - // TODO check if the exception was in the kernel - process_kill(process_current, 0); // TODO make the return code mean something - process_switch_any(); -} - void isr_stage3(int interrupt) { switch (interrupt) { case 0x08: // double fault tty_const("#DF"); panic_invalid_state(); - case 0x0D: // general protection fault - exception_finish(); - case 0x0E: { // page fault - /*int cr2; - tty_const("#PF at "); - asm ("mov %%cr2, %0;" : "=r"(cr2) ::); - _tty_var(cr2);*/ - exception_finish(); - } - case 0x34: isr_test_interrupt_called = true; return; default: - tty_const("unknown interrupt"); - panic_unimplemented(); + // TODO check if the exception was in the kernel + process_kill(process_current, interrupt); + process_switch_any(); } } |