From 60a373a7862a85b8b030ea1b18d01d364ddf8a8b Mon Sep 17 00:00:00 2001 From: Subv Date: Wed, 7 Jan 2015 10:10:58 -0500 Subject: Threads: Use a dummy idle thread when no other are ready. This thread will not actually execute instructions, it will only advance the timing/events and try to yield immediately to the next ready thread, if there aren't any ready threads then it will be rescheduled and start its job again. --- src/core/hle/kernel/kernel.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/core/hle/kernel/kernel.cpp') diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp index e59ed1b57..ae2c11a1c 100644 --- a/src/core/hle/kernel/kernel.cpp +++ b/src/core/hle/kernel/kernel.cpp @@ -124,6 +124,8 @@ bool LoadExec(u32 entry_point) { // 0x30 is the typical main thread priority I've seen used so far g_main_thread = Kernel::SetupMainThread(0x30); + // Setup the idle thread + Kernel::SetupIdleThread(); return true; } -- cgit v1.2.3