summaryrefslogtreecommitdiff
path: root/Source/Kernel/Core
diff options
context:
space:
mode:
authorAlexis211 <alexis211@gmail.com>2009-11-14 14:17:39 +0100
committerAlexis211 <alexis211@gmail.com>2009-11-14 14:17:39 +0100
commit972e9d53d243b698e9dce7125a08804a43b70534 (patch)
treee50cfc590ad2ec090cc774369c744f637e11cfc5 /Source/Kernel/Core
parent6055ef45a39b62bffa5f4c194e5d62a177c3b9df (diff)
downloadMelon-972e9d53d243b698e9dce7125a08804a43b70534.tar.gz
Melon-972e9d53d243b698e9dce7125a08804a43b70534.zip
Changed the way keyboard handling works, fixing a bug.
Diffstat (limited to 'Source/Kernel/Core')
-rw-r--r--Source/Kernel/Core/kmain.wtf.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/Kernel/Core/kmain.wtf.cpp b/Source/Kernel/Core/kmain.wtf.cpp
index b6543ae..0486702 100644
--- a/Source/Kernel/Core/kmain.wtf.cpp
+++ b/Source/Kernel/Core/kmain.wtf.cpp
@@ -201,7 +201,10 @@ void kmain(multiboot_info_t* mbd, u32int magic) {
if (init.empty()) {
*kvt << "\n\n";
new KernelShell(cwd, kvt);
- while (1) asm volatile("sti; hlt");
+ while (KernelShell::getInstances() > 0) {
+ Task::currThread()->sleep(100);
+ }
+ Sys::halt();
} else {
selectVideoMode(*kvt);
//Create a VT for handling the Melon bootup logo
@@ -222,7 +225,7 @@ void kmain(multiboot_info_t* mbd, u32int magic) {
p->setOutVT(vt);
p->start();
while (p->getState() != P_FINISHED) Task::currThread()->sleep(100);
- Sys::halt();
+ PANIC("Init has terminated");
}
}