diff options
| author | 2019-10-10 08:50:41 -0400 | |
|---|---|---|
| committer | 2019-10-15 11:55:21 -0400 | |
| commit | 96b1b144afff4ae4dd2d33547b8a62c46c920a84 (patch) | |
| tree | 9da69a571b8d77a51b00fc3d6ca6cb9b0a30bf22 | |
| parent | Kernel: Corrections to Wait Objects clearing in which a thread could still be... (diff) | |
| download | yuzu-96b1b144afff4ae4dd2d33547b8a62c46c920a84.tar.gz yuzu-96b1b144afff4ae4dd2d33547b8a62c46c920a84.tar.xz yuzu-96b1b144afff4ae4dd2d33547b8a62c46c920a84.zip | |
Kernel: Correct Paused scheduling
| -rw-r--r-- | src/core/hle/kernel/thread.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index 563a99bfc..0871a2f00 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp | |||
| @@ -354,9 +354,7 @@ void Thread::SetActivity(ThreadActivity value) { | |||
| 354 | 354 | ||
| 355 | if (value == ThreadActivity::Paused) { | 355 | if (value == ThreadActivity::Paused) { |
| 356 | // Set status if not waiting | 356 | // Set status if not waiting |
| 357 | if (status == ThreadStatus::Ready) { | 357 | if (status == ThreadStatus::Ready || status == ThreadStatus::Running) { |
| 358 | status = ThreadStatus::Paused; | ||
| 359 | } else if (status == ThreadStatus::Running) { | ||
| 360 | SetStatus(ThreadStatus::Paused); | 358 | SetStatus(ThreadStatus::Paused); |
| 361 | Core::System::GetInstance().CpuCore(processor_id).PrepareReschedule(); | 359 | Core::System::GetInstance().CpuCore(processor_id).PrepareReschedule(); |
| 362 | } | 360 | } |