From 12fef51bc74b3b5c1499e2e6b4a7181cafd627e0 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Mon, 23 Nov 2009 14:19:09 +0000 Subject: [PATCH] Since r33809 dprintf() acquires a mutex when called with interrupts enabled. This is something must must not do in an idle thread or we get the scheduler into trouble. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34196 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/system/kernel/main.cpp b/src/system/kernel/main.cpp index 84c7fe3f65..147fa73da7 100644 --- a/src/system/kernel/main.cpp +++ b/src/system/kernel/main.cpp @@ -227,7 +227,15 @@ _start(kernel_args *bootKernelArgs, int currentCPU) enable_interrupts(); } +#ifdef TRACE_BOOT + // We disable interrupts for this dprintf(), since otherwise dprintf() + // would acquires a mutex, which is something we must not do in an idle + // thread, or otherwise the scheduler would be seriously unhappy. + disable_interrupts(); TRACE("main: done... begin idle loop on cpu %d\n", currentCPU); + enable_interrupts(); +#endif + for (;;) arch_cpu_idle();