diff options
Diffstat (limited to 'src/interrupt.c')
-rw-r--r-- | src/interrupt.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/interrupt.c b/src/interrupt.c index 54f9947..6406fc0 100644 --- a/src/interrupt.c +++ b/src/interrupt.c @@ -3,6 +3,7 @@ struct handler { char8_t *description; bool (*fn)(uint32_t code); + bool apic; } handlers[256] = { [0] = { .description = u8"divide-by-zero-error" @@ -73,7 +74,12 @@ struct handler { }, [30] = { .description = u8"security exception" - } + }, + [32] = { + .description = u8"keyboard interrupt", + .fn = keyboard_interrupt_handler, + .apic = true, + }, }; void @@ -87,6 +93,9 @@ interrupt_handler(uint8_t n, uint32_t code) print(u8"Unhandled interrupt: %u8 (%s) with error code %x32\n", n, h->description ? h->description : u8"???", code); panic(); } + + if(h->apic) + apic_end_of_interrupt(); } |