From 9520a1a101b264abe700c3f7753f5f55bba4c681 Mon Sep 17 00:00:00 2001 From: Alexis211 Date: Sat, 17 Oct 2009 16:40:56 +0200 Subject: Each thread now has a kernel stack and an user stack --- Source/Kernel/MemoryManager/GDT.ns.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Source/Kernel/MemoryManager') diff --git a/Source/Kernel/MemoryManager/GDT.ns.cpp b/Source/Kernel/MemoryManager/GDT.ns.cpp index 4fb9803..0bb606d 100644 --- a/Source/Kernel/MemoryManager/GDT.ns.cpp +++ b/Source/Kernel/MemoryManager/GDT.ns.cpp @@ -2,9 +2,11 @@ extern "C" void gdt_flush(u32int); +#define GDT_ENTRIES 6 + namespace GDT { -gdt_entry_t gdt_entries[5]; +gdt_entry_t gdt_entries[GDT_ENTRIES]; gdt_ptr_t gdt_ptr; void setGate(s32int num, u32int base, u32int limit, u8int access, u8int gran) { @@ -19,7 +21,7 @@ void setGate(s32int num, u32int base, u32int limit, u8int access, u8int gran) { } void init() { - gdt_ptr.limit = (sizeof(gdt_entry_t) * 5) - 1; + gdt_ptr.limit = (sizeof(gdt_entry_t) * GDT_ENTRIES) - 1; gdt_ptr.base = (u32int)&gdt_entries; setGate(0, 0, 0, 0, 0); //Null segment -- cgit v1.2.3