aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/service_thread.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2022-03-12 03:06:57 -0800
committerbunnei <bunneidev@gmail.com>2022-03-14 18:14:54 -0700
commit8b109f8a69182d795136ccbddd1e52f3c50928c8 (patch)
tree760e2cc11ac422fe1b330fd6d3649e77c7699f83 /src/core/hle/kernel/service_thread.cpp
parent18baef2ec9ca5efc487b4574e609e1db8a2f75c4 (diff)
core: hle: kernel: Allocate dummy threads on host thread storage.
- Fixes a crash where on subsequent boots, long-lived host threads would have their dummy threads freed.
Diffstat (limited to 'src/core/hle/kernel/service_thread.cpp')
-rw-r--r--src/core/hle/kernel/service_thread.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/core/hle/kernel/service_thread.cpp b/src/core/hle/kernel/service_thread.cpp
index 4eb3a5988c..52d25b837b 100644
--- a/src/core/hle/kernel/service_thread.cpp
+++ b/src/core/hle/kernel/service_thread.cpp
@@ -49,12 +49,9 @@ ServiceThread::Impl::Impl(KernelCore& kernel, std::size_t num_threads, const std
return;
}
+ // Allocate a dummy guest thread for this host thread.
kernel.RegisterHostThread();
- // Ensure the dummy thread allocated for this host thread is closed on exit.
- auto* dummy_thread = kernel.GetCurrentEmuThread();
- SCOPE_EXIT({ dummy_thread->Close(); });
-
while (true) {
std::function<void()> task;