diff --git a/arch/exception.h b/arch/exception.h deleted file mode 100644 index 1774164..0000000 --- a/arch/exception.h +++ /dev/null @@ -1,37 +0,0 @@ -#ifndef KERNELMQ_INCLUDED_EXCEPTION -#define KERNELMQ_INCLUDED_EXCEPTION 1 - -void interrupt_0(); -void interrupt_1(); -void interrupt_2(); -void interrupt_3(); -void interrupt_4(); -void interrupt_5(); -void interrupt_6(); -void interrupt_7(); -void interrupt_8(); -void interrupt_9(); -void interrupt_10(); -void interrupt_11(); -void interrupt_12(); -void interrupt_13(); -void interrupt_14(); -void interrupt_15(); -void interrupt_16(); -void interrupt_17(); -void interrupt_18(); -void interrupt_19(); -void interrupt_20(); -void interrupt_21(); -void interrupt_22(); -void interrupt_23(); -void interrupt_24(); -void interrupt_25(); -void interrupt_26(); -void interrupt_27(); -void interrupt_28(); -void interrupt_29(); -void interrupt_30(); -void interrupt_31(); - -#endif diff --git a/arch/hwint.h b/arch/hwint.h index 98deb1c..ee02f65 100644 --- a/arch/hwint.h +++ b/arch/hwint.h @@ -5,21 +5,4 @@ typedef void(*hwint_handler_t)(); void hwint_register_handler(unsigned int int_no, hwint_handler_t handler); -void interrupt_32(); -void interrupt_33(); -void interrupt_34(); -void interrupt_35(); -void interrupt_36(); -void interrupt_37(); -void interrupt_38(); -void interrupt_39(); -void interrupt_40(); -void interrupt_41(); -void interrupt_42(); -void interrupt_43(); -void interrupt_44(); -void interrupt_45(); -void interrupt_46(); -void interrupt_47(); - #endif diff --git a/arch/interrupt.h b/arch/interrupt.h index 1d15f3a..9126e06 100644 --- a/arch/interrupt.h +++ b/arch/interrupt.h @@ -8,4 +8,59 @@ struct IsrRegisters { unsigned int eip, cs, eflags, useresp, ss; // Pushed by the processor automatically. }; +// Protected mode exteptions +void interrupt_0(); +void interrupt_1(); +void interrupt_2(); +void interrupt_3(); +void interrupt_4(); +void interrupt_5(); +void interrupt_6(); +void interrupt_7(); +void interrupt_8(); +void interrupt_9(); +void interrupt_10(); +void interrupt_11(); +void interrupt_12(); +void interrupt_13(); +void interrupt_14(); +void interrupt_15(); +void interrupt_16(); +void interrupt_17(); +void interrupt_18(); +void interrupt_19(); +void interrupt_20(); +void interrupt_21(); +void interrupt_22(); +void interrupt_23(); +void interrupt_24(); +void interrupt_25(); +void interrupt_26(); +void interrupt_27(); +void interrupt_28(); +void interrupt_29(); +void interrupt_30(); +void interrupt_31(); + +// Hardware IRQs +void interrupt_32(); +void interrupt_33(); +void interrupt_34(); +void interrupt_35(); +void interrupt_36(); +void interrupt_37(); +void interrupt_38(); +void interrupt_39(); +void interrupt_40(); +void interrupt_41(); +void interrupt_42(); +void interrupt_43(); +void interrupt_44(); +void interrupt_45(); +void interrupt_46(); +void interrupt_47(); + +// Syscalls +void interrupt_0x80(); + #endif diff --git a/arch/protected.c b/arch/protected.c index 31fd8ac..1083553 100644 --- a/arch/protected.c +++ b/arch/protected.c @@ -3,9 +3,8 @@ #include "config.h" #include "logger.h" #include "asm.h" -#include "exception.h" +#include "interrupt.h" #include "hwint.h" -#include "syscall.h" #include diff --git a/arch/syscall.h b/arch/syscall.h deleted file mode 100644 index e79e1ac..0000000 --- a/arch/syscall.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef KERNELMQ_INCLUDED_SYSCALL -#define KERNELMQ_INCLUDED_SYSCALL 1 - -void interrupt_0x80(); - -#endif