]> git.dujemihanovic.xyz Git - nameless-os.git/blobdiff - kernel/arch/x86/irq/sample_handler.c
Fix keyboard interrupts
[nameless-os.git] / kernel / arch / x86 / irq / sample_handler.c
index c8bddfec63bf61b22ef239727e0d075accea5744..d9bd8f9c953a3e48a46b6695957e28d6650aed0d 100644 (file)
@@ -1,5 +1,6 @@
 #include <tty.h>
 #include <irq/i8259a.h>
+#include <io.h>
 #include <stdint.h>
 
 typedef uint32_t uword_t;
@@ -17,6 +18,7 @@ void keyb_handler(struct interrupt_frame *frame)
 {
        pic_send_eoi(1);
        kprint("Got a keyboard interrupt!\n", 0);
+       inb(0x60);
 }
 
 
@@ -26,5 +28,6 @@ void double_fault(struct abort_frame *frame)
        *(volatile char *) (0xb8000) = ":";
        *(volatile char *) (0xb8002) = "(";
        asm volatile ("cli; hlt");
+       while(1);
 }