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 4ee7ad93ca..ac43a70946 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( for (auto& object : sync_objects) { object->AddWaitingThread(SharedFrom(thread)); } + + thread->SetSynchronizationObjects(&sync_objects); thread->SetSynchronizationResults(nullptr, RESULT_TIMEOUT); thread->SetStatus(ThreadStatus::WaitSynch); } @@ -83,6 +85,7 @@ std::pair<ResultCode, Handle> Synchronization::WaitFor( SchedulerLock lock(kernel); ResultCode signaling_result = thread->GetSignalingResult(); SynchronizationObject* signaling_object = thread->GetSignalingObject(); + thread->SetSynchronizationObjects(nullptr); for (auto& obj : sync_objects) { obj->RemoveWaitingThread(SharedFrom(thread)); } |