summaryrefslogtreecommitdiff
path: root/Source/Kernel/MemoryManager/GDT.ns.cpp
diff options
context:
space:
mode:
authorAlexis211 <alexis211@gmail.com>2009-10-17 16:40:56 +0200
committerAlexis211 <alexis211@gmail.com>2009-10-17 16:40:56 +0200
commit9520a1a101b264abe700c3f7753f5f55bba4c681 (patch)
tree2d73552c689c4de39b28c0e9930bc135b199a273 /Source/Kernel/MemoryManager/GDT.ns.cpp
parent45fcf4cc7ddacd93df2dd4d88ad31f6061e8d4a8 (diff)
downloadMelon-9520a1a101b264abe700c3f7753f5f55bba4c681.tar.gz
Melon-9520a1a101b264abe700c3f7753f5f55bba4c681.zip
Each thread now has a kernel stack and an user stack
Diffstat (limited to 'Source/Kernel/MemoryManager/GDT.ns.cpp')
-rw-r--r--Source/Kernel/MemoryManager/GDT.ns.cpp6
1 files changed, 4 insertions, 2 deletions
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