diff --git a/src/kernel/interrupt_handler/interrupt_handler.c b/src/kernel/interrupt_handler/interrupt_handler.c index 3f60907..2bfb130 100644 --- a/src/kernel/interrupt_handler/interrupt_handler.c +++ b/src/kernel/interrupt_handler/interrupt_handler.c @@ -21,7 +21,7 @@ static void scheduler_kill_handler (u16 UNUSED (msg), u16 pid, u16 return_value, static void scheduler_add_process_handler (u16 UNUSED (msg), u16 location, u16 name, u16 UNUSED (arg3)); static void scheduler_get_processes_list_handler (u16 UNUSED (msg), u16 raw_ptr1, u16 raw_ptr2, u16 raw_ptr3); -static u16 int_table_size; +u16 int_table_size; static Int_handler *int_table; Int_handler *int_handler_allocate (u16 nb_hardware) { diff --git a/src/kernel/interrupt_handler/interrupt_handler.h b/src/kernel/interrupt_handler/interrupt_handler.h index 2108113..92b7c3c 100644 --- a/src/kernel/interrupt_handler/interrupt_handler.h +++ b/src/kernel/interrupt_handler/interrupt_handler.h @@ -20,6 +20,8 @@ typedef enum { typedef void (*Int_handler) (u16 message, u16 arg1, u16 arg2, u16 arg3); +extern u16 int_table_size; + Int_handler *int_handler_allocate (u16 nb_hardware); void int_handler_activate (); void interrupt (u16 message, u16 arg_1, u16 arg_2, u16 arg_3); diff --git a/src/kernel/interrupt_handler/interrupt_handler_asm.dasm b/src/kernel/interrupt_handler/interrupt_handler_asm.dasm index 0fcf296..161f003 100644 --- a/src/kernel/interrupt_handler/interrupt_handler_asm.dasm +++ b/src/kernel/interrupt_handler/interrupt_handler_asm.dasm @@ -1,4 +1,6 @@ :interrupt_handler_asm ife A, 0xFFFE set PC, scheduler_switch - set PC, interrupt_handler + ifl A, int_table_size ; Protection against interrupts that don't exist + set PC, interrupt_handler + rfi 0