diff options
Diffstat (limited to 'src/interrupts')
-rw-r--r-- | src/interrupts/idt.c | 2 | ||||
-rw-r--r-- | src/interrupts/interrupts.h | 2 | ||||
-rw-r--r-- | src/interrupts/irq.c | 4 |
3 files changed, 7 insertions, 1 deletions
diff --git a/src/interrupts/idt.c b/src/interrupts/idt.c index 0fb95df..ba71339 100644 --- a/src/interrupts/idt.c +++ b/src/interrupts/idt.c @@ -1,4 +1,4 @@ -#include "../memory/memory.h" +#include "../lib/lib.h" struct idt_entry { unsigned short base_lo; diff --git a/src/interrupts/interrupts.h b/src/interrupts/interrupts.h index b91e91c..755a633 100644 --- a/src/interrupts/interrupts.h +++ b/src/interrupts/interrupts.h @@ -25,4 +25,6 @@ void irq_uninstall_handler(int irq); void irq_handler(struct regs *r); +int irq_is_installed(int irq); + #endif diff --git a/src/interrupts/irq.c b/src/interrupts/irq.c index 70f1eff..cf9e1fe 100644 --- a/src/interrupts/irq.c +++ b/src/interrupts/irq.c @@ -50,6 +50,10 @@ void irq_uninstall_handler(int irq) { irq_routines[irq] = 0; } +int irq_is_installed(int irq) { + return irq_routines[irq] != 0; +} + // Remap IRQs for protected mode compatibility via the PIC void irq_remap(void) { send(0x20, 0x11); |