summaryrefslogtreecommitdiff
path: root/src/stem/task/idt.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stem/task/idt.c')
-rw-r--r--src/stem/task/idt.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/stem/task/idt.c b/src/stem/task/idt.c
index 4866550..360ac91 100644
--- a/src/stem/task/idt.c
+++ b/src/stem/task/idt.c
@@ -95,7 +95,11 @@ void idt_irqHandler(struct registers regs) {
}
void idt_syscallHandler(struct registers regs) {
- syscalls[regs.eax](&regs);
+ if (syscalls[regs.eax] != 0) {
+ syscalls[regs.eax](&regs);
+ } else {
+ PANIC("unhandled syscall");
+ }
}
static void idt_setGate(uint8_t num, uint32_t base, uint16_t sel, uint8_t flags) {