diff options
| author | 2019-11-23 13:23:23 -0500 | |
|---|---|---|
| committer | 2019-11-23 13:23:23 -0500 | |
| commit | 6e4d46908af55e16afca1aa05aeab47e20ab49f5 (patch) | |
| tree | ce0f6fd75e88b90325ab2673964c2b07234bb3d0 /src/core/hle/kernel/thread.cpp | |
| parent | Merge pull request #3140 from FearlessTobi/port-4953 (diff) | |
| parent | Kernel: Correct Cancel Synchronization. (diff) | |
| download | yuzu-6e4d46908af55e16afca1aa05aeab47e20ab49f5.tar.gz yuzu-6e4d46908af55e16afca1aa05aeab47e20ab49f5.tar.xz yuzu-6e4d46908af55e16afca1aa05aeab47e20ab49f5.zip | |
Merge pull request #3130 from FernandoS27/cancel-sync
Kernel: Correct Cancel Synchronization.
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
| -rw-r--r-- | src/core/hle/kernel/thread.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index ee7531f2d..ab0e82ac2 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp | |||
| @@ -120,8 +120,11 @@ void Thread::ResumeFromWait() { | |||
| 120 | } | 120 | } |
| 121 | 121 | ||
| 122 | void Thread::CancelWait() { | 122 | void Thread::CancelWait() { |
| 123 | ASSERT(GetStatus() == ThreadStatus::WaitSynch); | 123 | if (GetSchedulingStatus() != ThreadSchedStatus::Paused) { |
| 124 | ClearWaitObjects(); | 124 | is_sync_cancelled = true; |
| 125 | return; | ||
| 126 | } | ||
| 127 | is_sync_cancelled = false; | ||
| 125 | SetWaitSynchronizationResult(ERR_SYNCHRONIZATION_CANCELED); | 128 | SetWaitSynchronizationResult(ERR_SYNCHRONIZATION_CANCELED); |
| 126 | ResumeFromWait(); | 129 | ResumeFromWait(); |
| 127 | } | 130 | } |