diff options
| author | Liam <byteslice@airmail.cc> | 2022-06-15 20:53:49 -0400 |
|---|---|---|
| committer | Liam <byteslice@airmail.cc> | 2022-06-15 20:53:49 -0400 |
| commit | 6d5cc6b2a2ab5257914ccb720d11ebd05d77136e (patch) | |
| tree | 629a48fa2061504484c692a35feefb2d076e35e9 /src/core/hle/kernel/k_process.cpp | |
| parent | 1d8e860c47a2bd9944443d9f4d717f6f19eaf72d (diff) | |
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 cd863e7156..61a4fb4641 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 |
