diff options
author | Marvin Borner | 2019-09-15 12:52:02 +0200 |
---|---|---|
committer | Marvin Borner | 2019-09-15 12:52:02 +0200 |
commit | 46fb7adb706bd92c04ea1d578a167cf5dd3f0f16 (patch) | |
tree | 16b87c4875b727c55159994670f074dd0329a45a /src/interrupts/interrupts.h | |
parent | 16913b711ad5e21392669cc65eb5eebdcc31e14c (diff) |
Added interrupt service routines and interrupt requests
Diffstat (limited to 'src/interrupts/interrupts.h')
-rw-r--r-- | src/interrupts/interrupts.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/interrupts/interrupts.h b/src/interrupts/interrupts.h new file mode 100644 index 0000000..b91e91c --- /dev/null +++ b/src/interrupts/interrupts.h @@ -0,0 +1,28 @@ +#ifndef MELVIX_INTERRUPTS_H +#define MELVIX_INTERRUPTS_H + +// IDT +void idt_install(); + +void idt_set_gate(unsigned char num, unsigned long base, unsigned short sel, unsigned char flags); + +// ISRS +void isrs_install(); + +struct regs { + unsigned int gs, fs, es, ds; + unsigned int edi, esi, ebp, esp, ebx, edx, ecx, eax; + unsigned int int_no, err_code; + unsigned int eip, cs, eflags, useresp, ss; +}; + +// IRQ +void irq_install(); + +void irq_install_handler(int irq, void (*handler)(struct regs *r)); + +void irq_uninstall_handler(int irq); + +void irq_handler(struct regs *r); + +#endif |