diff options
| author | 2017-12-30 12:05:10 -0500 | |
|---|---|---|
| committer | 2017-12-30 12:05:10 -0500 | |
| commit | eed4f2e2293cb39352811b7af28b57e58875fb0c (patch) | |
| tree | 3ba7e31a88a5f1d260a863f6c79aeece4fe857c1 /src/core/hle/kernel/thread.cpp | |
| parent | kernel: Various 64-bit fixes in memory/process/thread (diff) | |
| download | yuzu-eed4f2e2293cb39352811b7af28b57e58875fb0c.tar.gz yuzu-eed4f2e2293cb39352811b7af28b57e58875fb0c.tar.xz yuzu-eed4f2e2293cb39352811b7af28b57e58875fb0c.zip | |
thread: Main thread should be ready by default, all others dormant.
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
| -rw-r--r-- | src/core/hle/kernel/thread.cpp | 7 |
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, | |||
| 457 | // to initialize the context | 457 | // to initialize the context |
| 458 | ResetThreadContext(thread->context, stack_top, entry_point, arg); | 458 | ResetThreadContext(thread->context, stack_top, entry_point, arg); |
| 459 | 459 | ||
| 460 | ready_queue.push_back(thread->current_priority, thread.get()); | ||
| 461 | thread->status = THREADSTATUS_READY; | ||
| 462 | |||
| 463 | return MakeResult<SharedPtr<Thread>>(std::move(thread)); | 460 | return MakeResult<SharedPtr<Thread>>(std::move(thread)); |
| 464 | } | 461 | } |
| 465 | 462 | ||
| @@ -506,7 +503,9 @@ SharedPtr<Thread> SetupMainThread(VAddr entry_point, u32 priority, SharedPtr<Pro | |||
| 506 | thread->context.fpscr = | 503 | thread->context.fpscr = |
| 507 | FPSCR_DEFAULT_NAN | FPSCR_FLUSH_TO_ZERO | FPSCR_ROUND_TOZERO | FPSCR_IXC; // 0x03C00010 | 504 | FPSCR_DEFAULT_NAN | FPSCR_FLUSH_TO_ZERO | FPSCR_ROUND_TOZERO | FPSCR_IXC; // 0x03C00010 |
| 508 | 505 | ||
| 509 | // Note: The newly created thread will be run when the scheduler fires. | 506 | // Threads by default are dormant, wake up the main thread so it runs when the scheduler fires |
| 507 | thread->ResumeFromWait(); | ||
| 508 | |||
| 510 | return thread; | 509 | return thread; |
| 511 | } | 510 | } |
| 512 | 511 | ||