Updated idt.c 18-interrupts

Fix to get rid any possible multiple definition errors in `18-interrupts`
This commit is contained in:
Sriram Shanmuga 2020-07-21 18:53:59 +05:30 committed by GitHub
parent 9915d1fc1b
commit 231a854b3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,9 @@
#include "idt.h" #include "idt.h"
#include "../kernel/util.h" #include "../kernel/util.h"
idt_gate_t idt[IDT_ENTRIES];
idt_register_t idt_reg;
void set_idt_gate(int n, u32 handler) { void set_idt_gate(int n, u32 handler) {
idt[n].low_offset = low_16(handler); idt[n].low_offset = low_16(handler);
idt[n].sel = KERNEL_CS; idt[n].sel = KERNEL_CS;