diff options
author | dzwdz | 2021-10-05 21:00:02 +0200 |
---|---|---|
committer | dzwdz | 2021-10-05 21:00:02 +0200 |
commit | 1ee734761a3eecbdaf9631a653dee668d2de26ef (patch) | |
tree | aaaca27fbc1fc3e97f78c2f432a96609ee03a37a /src/kernel/arch/i386 | |
parent | 8d3ef773f8daea3a0c2b110ab48f235f5d2bf22d (diff) |
isr: simplify the exception handler
Diffstat (limited to 'src/kernel/arch/i386')
-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(); } } |