diff options
| author | bunnei <bunneidev@gmail.com> | 2022-06-21 15:30:27 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-21 15:30:27 -0700 |
| commit | 73e13aa09051ce802ad6a4c98e0ce325a2cd707c (patch) | |
| tree | 4485c500f91b1cb41bd81c16624b74d8c96b0d03 /src/core/hle/kernel/k_process.cpp | |
| parent | 0d5792cc57112c7db54cbd362d1dcdadae6ec27d (diff) | |
| parent | 744a20876301bd97dab06022e38a07553434f10f (diff) | |
Merge pull request #8468 from liamwhite/dispatch-tracking
kernel: fix some uses of disable_count
Diffstat (limited to 'src/core/hle/kernel/k_process.cpp')
| -rw-r--r-- | src/core/hle/kernel/k_process.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/core/hle/kernel/k_process.cpp b/src/core/hle/kernel/k_process.cpp index cd863e715..61a4fb464 100644 --- a/src/core/hle/kernel/k_process.cpp +++ b/src/core/hle/kernel/k_process.cpp @@ -57,18 +57,13 @@ void SetupMainThread(Core::System& system, KProcess& owner_process, u32 priority thread->GetContext64().cpu_registers[0] = 0; thread->GetContext32().cpu_registers[1] = thread_handle; thread->GetContext64().cpu_registers[1] = thread_handle; - thread->DisableDispatch(); - auto& kernel = system.Kernel(); - // Threads by default are dormant, wake up the main thread so it runs when the scheduler fires - { - KScopedSchedulerLock lock{kernel}; - thread->SetState(ThreadState::Runnable); - - if (system.DebuggerEnabled()) { - thread->RequestSuspend(SuspendType::Debug); - } + if (system.DebuggerEnabled()) { + thread->RequestSuspend(SuspendType::Debug); } + + // Run our thread. + void(thread->Run()); } } // Anonymous namespace |
