diff --git a/src/Interrupts.cc b/src/Interrupts.cc index 2b8f5fa..dac2141 100644 --- a/src/Interrupts.cc +++ b/src/Interrupts.cc @@ -89,6 +89,13 @@ InterruptHandler::postInterrupt(uint8_t interrupt) asm("int %0": : "a"(interrupt)); } + +void +InterruptHandler::finishHardwareInterrupt(uint8_t irq) +{ + mPIC.endOfInterrupt(irq); +} + } /* namespace x86 */ @@ -143,4 +150,7 @@ handleKeyboardInterrupt() { auto& console = kernel::Console::systemConsole(); console.printString("Key!\n"); + + auto& interruptHandler = x86::InterruptHandler::systemInterruptHandler(); + interruptHandler.finishHardwareInterrupt(1); } diff --git a/src/Interrupts.hh b/src/Interrupts.hh index 94be2dd..1829c64 100644 --- a/src/Interrupts.hh +++ b/src/Interrupts.hh @@ -57,6 +57,8 @@ struct InterruptHandler void postInterrupt(uint8_t interrupt); + void finishHardwareInterrupt(uint8_t irq); + private: PIC mPIC; IDT mIDT;