From 972e9d53d243b698e9dce7125a08804a43b70534 Mon Sep 17 00:00:00 2001 From: Alexis211 Date: Sat, 14 Nov 2009 14:17:39 +0100 Subject: Changed the way keyboard handling works, fixing a bug. --- Source/Kernel/Core/kmain.wtf.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Source/Kernel/Core') 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"); } } -- cgit v1.2.3