소스 검색

Scheduler: Correct locking for hle threads.

Fernando Sahmkow 6 년 전
부모
커밋
44cb9997b3
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      src/core/hle/kernel/scheduler.cpp

+ 2 - 1
src/core/hle/kernel/scheduler.cpp

@@ -687,9 +687,10 @@ void Scheduler::SwitchToCurrent() {
         guard.lock();
         selected_thread = selected_thread_set;
         current_thread = selected_thread;
+        is_context_switch_pending = false;
         guard.unlock();
         while (!is_context_switch_pending) {
-            if (current_thread != nullptr) {
+            if (current_thread != nullptr && !current_thread->IsHLEThread()) {
                 current_thread->context_guard.lock();
                 if (current_thread->GetSchedulingStatus() != ThreadSchedStatus::Runnable) {
                     current_thread->context_guard.unlock();