diff options
Diffstat (limited to 'src/kernel/core/idt.c')
-rw-r--r-- | src/kernel/core/idt.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/kernel/core/idt.c b/src/kernel/core/idt.c index d34d03f..5c77502 100644 --- a/src/kernel/core/idt.c +++ b/src/kernel/core/idt.c @@ -107,6 +107,8 @@ void idt_ex_handler(registers_t *regs) { /* Called in interrupt.s when an IRQ fires (interrupt 32 to 47) */ void idt_irq_handler(registers_t *regs) { + int st = enter_critical(CL_EXCL); // if someone tries to yield(), an assert will fail + if (regs->err_code > 7) { outb(0xA0, 0x20); } @@ -116,6 +118,8 @@ void idt_irq_handler(registers_t *regs) { if (irq_handlers[regs->err_code] != 0) { irq_handlers[regs->err_code](regs); } + + exit_critical(st); } /* Caled in interrupt.s when a syscall is called */ |