summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2022-01-18 01:44:14 +0100
committerbunnei <bunneidev@gmail.com>2022-01-21 02:08:00 +0100
commit11a380c3dae0ac5a419d91dc41a5aa32c4c72868 (patch)
treef87e4c9dbde4da94300903251d65401c8782ed99
parenthle: kernel: KThread: Rename thread_type_for_debugging -> thread_type. (diff)
downloadyuzu-11a380c3dae0ac5a419d91dc41a5aa32c4c72868.tar
yuzu-11a380c3dae0ac5a419d91dc41a5aa32c4c72868.tar.gz
yuzu-11a380c3dae0ac5a419d91dc41a5aa32c4c72868.tar.bz2
yuzu-11a380c3dae0ac5a419d91dc41a5aa32c4c72868.tar.lz
yuzu-11a380c3dae0ac5a419d91dc41a5aa32c4c72868.tar.xz
yuzu-11a380c3dae0ac5a419d91dc41a5aa32c4c72868.tar.zst
yuzu-11a380c3dae0ac5a419d91dc41a5aa32c4c72868.zip
-rw-r--r--src/core/hle/kernel/k_scheduler.cpp5
1 files changed, 5 insertions, 0 deletions
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();