summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2017-12-30 18:05:10 +0100
committerbunnei <bunneidev@gmail.com>2017-12-30 18:05:10 +0100
commiteed4f2e2293cb39352811b7af28b57e58875fb0c (patch)
tree3ba7e31a88a5f1d260a863f6c79aeece4fe857c1
parentkernel: Various 64-bit fixes in memory/process/thread (diff)
downloadyuzu-eed4f2e2293cb39352811b7af28b57e58875fb0c.tar
yuzu-eed4f2e2293cb39352811b7af28b57e58875fb0c.tar.gz
yuzu-eed4f2e2293cb39352811b7af28b57e58875fb0c.tar.bz2
yuzu-eed4f2e2293cb39352811b7af28b57e58875fb0c.tar.lz
yuzu-eed4f2e2293cb39352811b7af28b57e58875fb0c.tar.xz
yuzu-eed4f2e2293cb39352811b7af28b57e58875fb0c.tar.zst
yuzu-eed4f2e2293cb39352811b7af28b57e58875fb0c.zip
-rw-r--r--src/core/hle/kernel/thread.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp
index 1645437b6..32fa5e314 100644
--- a/src/core/hle/kernel/thread.cpp
+++ b/src/core/hle/kernel/thread.cpp
@@ -457,9 +457,6 @@ ResultVal<SharedPtr<Thread>> Thread::Create(std::string name, VAddr entry_point,
// to initialize the context
ResetThreadContext(thread->context, stack_top, entry_point, arg);
- ready_queue.push_back(thread->current_priority, thread.get());
- thread->status = THREADSTATUS_READY;
-
return MakeResult<SharedPtr<Thread>>(std::move(thread));
}
@@ -506,7 +503,9 @@ SharedPtr<Thread> SetupMainThread(VAddr entry_point, u32 priority, SharedPtr<Pro
thread->context.fpscr =
FPSCR_DEFAULT_NAN | FPSCR_FLUSH_TO_ZERO | FPSCR_ROUND_TOZERO | FPSCR_IXC; // 0x03C00010
- // Note: The newly created thread will be run when the scheduler fires.
+ // Threads by default are dormant, wake up the main thread so it runs when the scheduler fires
+ thread->ResumeFromWait();
+
return thread;
}