diff options
| author | 2019-11-16 11:05:39 -0400 | |
|---|---|---|
| committer | 2019-11-16 12:41:51 -0400 | |
| commit | 7d16b2d2ddd170a24cc09f258fbf2e56f34b009d (patch) | |
| tree | a76350979c9df80abaeb271173b09f0fcf488070 /src/core/hle/kernel/svc.cpp | |
| parent | Merge pull request #3113 from lioncash/semi (diff) | |
| download | yuzu-7d16b2d2ddd170a24cc09f258fbf2e56f34b009d.tar.gz yuzu-7d16b2d2ddd170a24cc09f258fbf2e56f34b009d.tar.xz yuzu-7d16b2d2ddd170a24cc09f258fbf2e56f34b009d.zip | |
Kernel: Correct Cancel Synchronization.
This commit corrects the behavior of cancel synchronization when the
thread is running/ready and ensures the next wait is cancelled as it's
suppose to.
Diffstat (limited to 'src/core/hle/kernel/svc.cpp')
| -rw-r--r-- | src/core/hle/kernel/svc.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index c63a9ba8b..b2cef3be9 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp | |||
| @@ -505,6 +505,11 @@ static ResultCode WaitSynchronization(Core::System& system, Handle* index, VAddr | |||
| 505 | return RESULT_TIMEOUT; | 505 | return RESULT_TIMEOUT; |
| 506 | } | 506 | } |
| 507 | 507 | ||
| 508 | if (thread->IsSyncCancelled()) { | ||
| 509 | thread->SetSyncCancelled(false); | ||
| 510 | return ERR_SYNCHRONIZATION_CANCELED; | ||
| 511 | } | ||
| 512 | |||
| 508 | for (auto& object : objects) { | 513 | for (auto& object : objects) { |
| 509 | object->AddWaitingThread(thread); | 514 | object->AddWaitingThread(thread); |
| 510 | } | 515 | } |