Sfoglia il codice sorgente

hle: kernel: KScheduler: Ensure dummy threads are never scheduled.

- These are only used by host threads for locking.
bunnei 4 anni fa
parent
commit
11a380c3da
1 ha cambiato i file con 5 aggiunte e 0 eliminazioni
  1. 5 0
      src/core/hle/kernel/k_scheduler.cpp

+ 5 - 0
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();