From 68308271988a4c18d2dae526300ce67a4f4045cb Mon Sep 17 00:00:00 2001 From: Akshaylal Date: Mon, 24 May 2021 20:12:12 +0530 Subject: [PATCH] moved idt and idt_reg from idt.h to idt.c --- 18-interrupts/cpu/idt.c | 3 +++ 18-interrupts/cpu/idt.h | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/18-interrupts/cpu/idt.c b/18-interrupts/cpu/idt.c index 999d0c9..cdb7e99 100644 --- a/18-interrupts/cpu/idt.c +++ b/18-interrupts/cpu/idt.c @@ -1,6 +1,9 @@ #include "idt.h" #include "../kernel/util.h" +idt_gate_t idt[IDT_ENTRIES]; +idt_register_t idt_reg; + void set_idt_gate(int n, u32 handler) { idt[n].low_offset = low_16(handler); idt[n].sel = KERNEL_CS; diff --git a/18-interrupts/cpu/idt.h b/18-interrupts/cpu/idt.h index 27bfac5..b31f3e3 100644 --- a/18-interrupts/cpu/idt.h +++ b/18-interrupts/cpu/idt.h @@ -28,8 +28,6 @@ typedef struct { } __attribute__((packed)) idt_register_t; #define IDT_ENTRIES 256 -idt_gate_t idt[IDT_ENTRIES]; -idt_register_t idt_reg; /* Functions implemented in idt.c */