From d1ebb35f584c357a46ec5ad8fbce192c0af142c4 Mon Sep 17 00:00:00 2001 From: Braiden Vasco Date: Wed, 1 Nov 2017 10:47:43 +0000 Subject: [PATCH] Move structs from headers to sources --- arch/gdt.c | 16 ++++++++++++++++ arch/gdt.h | 16 ---------------- arch/idt.c | 15 +++++++++++++++ arch/idt.h | 15 --------------- 4 files changed, 31 insertions(+), 31 deletions(-) diff --git a/arch/gdt.c b/arch/gdt.c index 0387dc3..fcfa833 100644 --- a/arch/gdt.c +++ b/arch/gdt.c @@ -2,6 +2,22 @@ #include "logger.h" +struct GdtPointer { + unsigned short limit; + unsigned int base; +} +__attribute__((packed)); + +struct GdtEntry { + unsigned short limit_low; + unsigned short base_low; + unsigned char base_middle; + unsigned char access; + unsigned char granularity; + unsigned char base_high; +} +__attribute__((packed)); + static struct GdtPointer gdt_pointer; static struct GdtEntry gdt_entries[5]; diff --git a/arch/gdt.h b/arch/gdt.h index 5134ab7..2450939 100644 --- a/arch/gdt.h +++ b/arch/gdt.h @@ -1,22 +1,6 @@ #ifndef TAILIX_KERNEL_INCLUDED_GDT #define TAILIX_KERNEL_INCLUDED_GDT 1 -struct GdtPointer { - unsigned short limit; - unsigned int base; -} -__attribute__((packed)); - -struct GdtEntry { - unsigned short limit_low; - unsigned short base_low; - unsigned char base_middle; - unsigned char access; - unsigned char granularity; - unsigned char base_high; -} -__attribute__((packed)); - void gdt_initialize(); #endif diff --git a/arch/idt.c b/arch/idt.c index dc9ca14..80edf7a 100644 --- a/arch/idt.c +++ b/arch/idt.c @@ -2,6 +2,21 @@ #include "logger.h" +struct IdtPointer { + unsigned short limit; + unsigned int base; +} +__attribute__((packed)); + +struct IdtEntry { + unsigned short base_lo; + unsigned short sel; + unsigned char always0; + unsigned char flags; + unsigned short base_hi; +} +__attribute__((packed)); + static struct IdtPointer idt_pointer; static struct IdtEntry idt_entries[256]; diff --git a/arch/idt.h b/arch/idt.h index c270a52..dc0f8f4 100644 --- a/arch/idt.h +++ b/arch/idt.h @@ -1,21 +1,6 @@ #ifndef TAILIX_KERNEL_INCLUDED_IDT #define TAILIX_KERNEL_INCLUDED_IDT 1 -struct IdtPointer { - unsigned short limit; - unsigned int base; -} -__attribute__((packed)); - -struct IdtEntry { - unsigned short base_lo; - unsigned short sel; - unsigned char always0; - unsigned char flags; - unsigned short base_hi; -} -__attribute__((packed)); - void idt_initialize(); #endif