diff options
| author | 2020-03-06 22:58:56 -0400 | |
|---|---|---|
| committer | 2020-06-27 11:35:32 -0400 | |
| commit | 44cb9997b3bf3b1e16b05c2b115c7c4ad5e37dd1 (patch) | |
| tree | 90bcdf95086664472988143f69a602b67759b3c6 /src/core/hle/kernel/scheduler.cpp | |
| parent | Scheduler: Fix HLE Threads on guard (diff) | |
| download | yuzu-44cb9997b3bf3b1e16b05c2b115c7c4ad5e37dd1.tar.gz yuzu-44cb9997b3bf3b1e16b05c2b115c7c4ad5e37dd1.tar.xz yuzu-44cb9997b3bf3b1e16b05c2b115c7c4ad5e37dd1.zip | |
Scheduler: Correct locking for hle threads.
Diffstat (limited to 'src/core/hle/kernel/scheduler.cpp')
| -rw-r--r-- | src/core/hle/kernel/scheduler.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/hle/kernel/scheduler.cpp b/src/core/hle/kernel/scheduler.cpp index d7529360c..f020438fb 100644 --- a/src/core/hle/kernel/scheduler.cpp +++ b/src/core/hle/kernel/scheduler.cpp | |||
| @@ -687,9 +687,10 @@ void Scheduler::SwitchToCurrent() { | |||
| 687 | guard.lock(); | 687 | guard.lock(); |
| 688 | selected_thread = selected_thread_set; | 688 | selected_thread = selected_thread_set; |
| 689 | current_thread = selected_thread; | 689 | current_thread = selected_thread; |
| 690 | is_context_switch_pending = false; | ||
| 690 | guard.unlock(); | 691 | guard.unlock(); |
| 691 | while (!is_context_switch_pending) { | 692 | while (!is_context_switch_pending) { |
| 692 | if (current_thread != nullptr) { | 693 | if (current_thread != nullptr && !current_thread->IsHLEThread()) { |
| 693 | current_thread->context_guard.lock(); | 694 | current_thread->context_guard.lock(); |
| 694 | if (current_thread->GetSchedulingStatus() != ThreadSchedStatus::Runnable) { | 695 | if (current_thread->GetSchedulingStatus() != ThreadSchedStatus::Runnable) { |
| 695 | current_thread->context_guard.unlock(); | 696 | current_thread->context_guard.unlock(); |