summaryrefslogtreecommitdiff
path: root/kernel/syscalls/install_irq.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/syscalls/install_irq.c')
-rw-r--r--kernel/syscalls/install_irq.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/kernel/syscalls/install_irq.c b/kernel/syscalls/install_irq.c
deleted file mode 100644
index 5ad2ee6..0000000
--- a/kernel/syscalls/install_irq.c
+++ /dev/null
@@ -1,23 +0,0 @@
-#include <sched/scheduler.h>
-#include <syscalls.h>
-
-process_t *tmp;
-void *handler;
-
-void jump_signal_handler(void *func, u32 esp);
-
-void test_handler(reg_t *regs) {
- tmp->interrupt_handler = handler;
- signal_t sig;
- sig.handler_ip = (uintptr_t)handler;
- process_push_signal(tmp, sig);
- return;
-}
-
-int syscall_install_irq(void (*irq_handler)(), u8 irq) {
- // TODO: This should be able to fail if the handler is already set
- tmp = current_task;
- handler = irq_handler;
- install_handler(test_handler, INT_32_INTERRUPT_GATE(0x0), 0x20 + irq);
- return 1;
-}