diff options
author | Alexis211 <alexis211@gmail.com> | 2009-08-29 13:39:06 +0200 |
---|---|---|
committer | Alexis211 <alexis211@gmail.com> | 2009-08-29 13:39:06 +0200 |
commit | c92beeedda51487696ce476ee30604f22e7b2270 (patch) | |
tree | 29b89d31b0b35792e1ed2bc5861be0439e7e40d9 /Source/Kernel/Core | |
parent | 5deab22107fc38bd2bea19f07889b14c376754e0 (diff) | |
download | Melon-c92beeedda51487696ce476ee30604f22e7b2270.tar.gz Melon-c92beeedda51487696ce476ee30604f22e7b2270.zip |
The Melon kernel now has support for simple multitasking
Diffstat (limited to 'Source/Kernel/Core')
-rw-r--r-- | Source/Kernel/Core/kmain.wtf.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Source/Kernel/Core/kmain.wtf.cpp b/Source/Kernel/Core/kmain.wtf.cpp index 2ce331b..8343b67 100644 --- a/Source/Kernel/Core/kmain.wtf.cpp +++ b/Source/Kernel/Core/kmain.wtf.cpp @@ -11,6 +11,7 @@ #include <MemoryManager/PhysMem.ns.h> #include <MemoryManager/PageAlloc.ns.h> #include <MemoryManager/GDT.ns.h> +#include <TaskManager/Task.ns.h> #include <SyscallManager/IDT.ns.h> #include <Library/String.class.h> @@ -55,7 +56,7 @@ void kmain(multiboot_info_t* mbd, u32int magic) { melonLogoVT->map(2); //Create a VT for logging what kernel does - VirtualTerminal *kvt = new VirtualTerminal(12, 40, 0, 2); + VirtualTerminal *kvt = new VirtualTerminal(12, 40, 0, 7); kvt->map(melonLogoLines + 4); *kvt << "* Kernel initializing in HIGHER HALF!\n"; @@ -88,10 +89,16 @@ void kmain(multiboot_info_t* mbd, u32int magic) { *kvt << "OK.\n> Initializing PIT..."; Dev::registerDevice(new Timer()); + *kvt << "OK.\n> Initializing multitasking..."; + Task::initialize(String((char*)mbd->cmdline)); + *kvt << "OK.\n"; asm volatile("sti"); - while(1) asm volatile("sti; hlt"); + while(1) { + Task::currentThread->sleep(1000); + *kvt << "."; + } PANIC("END OF KMAIN"); } |