summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2022-01-18 01:46:29 +0100
committerbunnei <bunneidev@gmail.com>2022-01-21 02:08:00 +0100
commit5ffec69dc79f489631916b71d89090e837997f01 (patch)
tree7c09c67615bd67a1adb1f72bef34758f47994a7e /src/core
parenthle: kernel: KScheduler: Ensure dummy threads are never scheduled. (diff)
downloadyuzu-5ffec69dc79f489631916b71d89090e837997f01.tar
yuzu-5ffec69dc79f489631916b71d89090e837997f01.tar.gz
yuzu-5ffec69dc79f489631916b71d89090e837997f01.tar.bz2
yuzu-5ffec69dc79f489631916b71d89090e837997f01.tar.lz
yuzu-5ffec69dc79f489631916b71d89090e837997f01.tar.xz
yuzu-5ffec69dc79f489631916b71d89090e837997f01.tar.zst
yuzu-5ffec69dc79f489631916b71d89090e837997f01.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/hle/kernel/k_thread.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/hle/kernel/k_thread.cpp b/src/core/hle/kernel/k_thread.cpp
index 5eb64a381..35c4a7581 100644
--- a/src/core/hle/kernel/k_thread.cpp
+++ b/src/core/hle/kernel/k_thread.cpp
@@ -1097,6 +1097,11 @@ void KThread::EndWait(ResultCode wait_result_) {
// Lock the scheduler.
KScopedSchedulerLock sl(kernel);
+ // Dummy threads are just used by host threads for locking, and will never have a wait_queue.
+ if (thread_type == ThreadType::Dummy) {
+ return;
+ }
+
// If we're waiting, notify our queue that we're available.
if (GetState() == ThreadState::Waiting) {
wait_queue->EndWait(this, wait_result_);