diff options
| author | 2017-08-22 17:45:47 -0400 | |
|---|---|---|
| committer | 2017-08-22 17:45:47 -0400 | |
| commit | 2bbff9fa962ffb3e03116e51ba8fb1778a4d10e5 (patch) | |
| tree | 160cf2ee466c82223a3527f01cd0b25b1e5c3225 /src/core/hle/kernel/thread.cpp | |
| parent | Merge pull request #2888 from Subv/warnings (diff) | |
| parent | Kernel/Threads: Don't immediately switch to the new main thread when loading ... (diff) | |
| download | yuzu-2bbff9fa962ffb3e03116e51ba8fb1778a4d10e5.tar.gz yuzu-2bbff9fa962ffb3e03116e51ba8fb1778a4d10e5.tar.xz yuzu-2bbff9fa962ffb3e03116e51ba8fb1778a4d10e5.zip | |
Merge pull request #2893 from Subv/not_schedule_main_thread
Kernel/Threads: Don't immediately switch to the new main thread when loading a new process.
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
| -rw-r--r-- | src/core/hle/kernel/thread.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index f5f2eb2f7..b957c45dd 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp | |||
| @@ -478,8 +478,6 @@ void Thread::BoostPriority(s32 priority) { | |||
| 478 | } | 478 | } |
| 479 | 479 | ||
| 480 | SharedPtr<Thread> SetupMainThread(u32 entry_point, s32 priority) { | 480 | SharedPtr<Thread> SetupMainThread(u32 entry_point, s32 priority) { |
| 481 | DEBUG_ASSERT(!GetCurrentThread()); | ||
| 482 | |||
| 483 | // Initialize new "main" thread | 481 | // Initialize new "main" thread |
| 484 | auto thread_res = Thread::Create("main", entry_point, priority, 0, THREADPROCESSORID_0, | 482 | auto thread_res = Thread::Create("main", entry_point, priority, 0, THREADPROCESSORID_0, |
| 485 | Memory::HEAP_VADDR_END); | 483 | Memory::HEAP_VADDR_END); |
| @@ -489,9 +487,7 @@ SharedPtr<Thread> SetupMainThread(u32 entry_point, s32 priority) { | |||
| 489 | thread->context.fpscr = | 487 | thread->context.fpscr = |
| 490 | FPSCR_DEFAULT_NAN | FPSCR_FLUSH_TO_ZERO | FPSCR_ROUND_TOZERO | FPSCR_IXC; // 0x03C00010 | 488 | FPSCR_DEFAULT_NAN | FPSCR_FLUSH_TO_ZERO | FPSCR_ROUND_TOZERO | FPSCR_IXC; // 0x03C00010 |
| 491 | 489 | ||
| 492 | // Run new "main" thread | 490 | // Note: The newly created thread will be run when the scheduler fires. |
| 493 | SwitchContext(thread.get()); | ||
| 494 | |||
| 495 | return thread; | 491 | return thread; |
| 496 | } | 492 | } |
| 497 | 493 | ||