diff options
Diffstat (limited to 'src/core/hle/kernel/synchronization.cpp')
| -rw-r--r-- | src/core/hle/kernel/synchronization.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/hle/kernel/synchronization.cpp b/src/core/hle/kernel/synchronization.cpp index 4ee7ad93c..ac43a7094 100644 --- a/src/core/hle/kernel/synchronization.cpp +++ b/src/core/hle/kernel/synchronization.cpp | |||
| @@ -70,6 +70,8 @@ std::pair<ResultCode, Handle> Synchronization::WaitFor( | |||
| 70 | for (auto& object : sync_objects) { | 70 | for (auto& object : sync_objects) { |
| 71 | object->AddWaitingThread(SharedFrom(thread)); | 71 | object->AddWaitingThread(SharedFrom(thread)); |
| 72 | } | 72 | } |
| 73 | |||
| 74 | thread->SetSynchronizationObjects(&sync_objects); | ||
| 73 | thread->SetSynchronizationResults(nullptr, RESULT_TIMEOUT); | 75 | thread->SetSynchronizationResults(nullptr, RESULT_TIMEOUT); |
| 74 | thread->SetStatus(ThreadStatus::WaitSynch); | 76 | thread->SetStatus(ThreadStatus::WaitSynch); |
| 75 | } | 77 | } |
| @@ -83,6 +85,7 @@ std::pair<ResultCode, Handle> Synchronization::WaitFor( | |||
| 83 | SchedulerLock lock(kernel); | 85 | SchedulerLock lock(kernel); |
| 84 | ResultCode signaling_result = thread->GetSignalingResult(); | 86 | ResultCode signaling_result = thread->GetSignalingResult(); |
| 85 | SynchronizationObject* signaling_object = thread->GetSignalingObject(); | 87 | SynchronizationObject* signaling_object = thread->GetSignalingObject(); |
| 88 | thread->SetSynchronizationObjects(nullptr); | ||
| 86 | for (auto& obj : sync_objects) { | 89 | for (auto& obj : sync_objects) { |
| 87 | obj->RemoveWaitingThread(SharedFrom(thread)); | 90 | obj->RemoveWaitingThread(SharedFrom(thread)); |
| 88 | } | 91 | } |