From 95cd78840f0891e60f5ebecc8a8eb4fbaf3c2ebf Mon Sep 17 00:00:00 2001 From: Danny Holman Date: Sun, 12 Jan 2025 01:17:36 -0600 Subject: PROJECT RESTRUCTURING Move the entire kernel into its own directory. Create new directories for system commands, libraries and other required essentials for a complete Unix-like operating system. Signed-off-by: Danny Holman --- kernel/interrupt.c | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 kernel/interrupt.c (limited to 'kernel/interrupt.c') diff --git a/kernel/interrupt.c b/kernel/interrupt.c deleted file mode 100644 index 9639aea..0000000 --- a/kernel/interrupt.c +++ /dev/null @@ -1,20 +0,0 @@ -#include -#include - -static void (*isr_handlers[MAX_ISR])(struct isr_frame *frame); - -void register_isr_handler(unsigned int isr, void (*handler)(struct isr_frame *frame)) { - if (isr > MAX_ISR) - panic("Attempted to set non-existant interrupt vector"); - isr_handlers[isr] = handler; -} - -void clear_isr_handler(unsigned int isr) { - if (isr > MAX_ISR) - panic("Attempted to clear non-existant interrupt vector"); - isr_handlers[isr] = NULL; -} - -void isr_dispatch(struct isr_frame frame) { - (*isr_handlers[frame.isr_vector])(&frame); -} -- cgit v1.2.3