diff options
author | Marvin Borner | 2019-09-19 19:56:59 +0200 |
---|---|---|
committer | Marvin Borner | 2019-09-19 20:05:38 +0200 |
commit | 05e1fedcc9cd30d1a34a65e640da45e980b4f859 (patch) | |
tree | 9cfb7620907ac126f26cdfe9363cb73ed74ea179 /src/kernel/interrupts/interrupts.h | |
parent | ffd82e18b5259fab477ad375a7af8550fac526d8 (diff) |
Moved source to kernel directory
Diffstat (limited to 'src/kernel/interrupts/interrupts.h')
-rw-r--r-- | src/kernel/interrupts/interrupts.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/kernel/interrupts/interrupts.h b/src/kernel/interrupts/interrupts.h new file mode 100644 index 0000000..755a633 --- /dev/null +++ b/src/kernel/interrupts/interrupts.h @@ -0,0 +1,30 @@ +#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); + +int irq_is_installed(int irq); + +#endif |