From 11a380c3dae0ac5a419d91dc41a5aa32c4c72868 Mon Sep 17 00:00:00 2001 From: bunnei Date: Mon, 17 Jan 2022 16:44:14 -0800 Subject: hle: kernel: KScheduler: Ensure dummy threads are never scheduled. - These are only used by host threads for locking. --- src/core/hle/kernel/k_scheduler.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/core/hle') diff --git a/src/core/hle/kernel/k_scheduler.cpp b/src/core/hle/kernel/k_scheduler.cpp index f900b2e7a..5d39a1d4a 100644 --- a/src/core/hle/kernel/k_scheduler.cpp +++ b/src/core/hle/kernel/k_scheduler.cpp @@ -739,6 +739,11 @@ void KScheduler::ScheduleImpl() { next_thread = idle_thread; } + // We never want to schedule a dummy thread, as these are only used by host threads for locking. + if (next_thread->GetThreadType() == ThreadType::Dummy) { + next_thread = idle_thread; + } + // If we're not actually switching thread, there's nothing to do. if (next_thread == current_thread.load()) { previous_thread->EnableDispatch(); -- cgit v1.2.3