diff options
author | Subv <subv2112@gmail.com> | 2017-09-28 18:53:32 +0200 |
---|---|---|
committer | Subv <subv2112@gmail.com> | 2017-09-28 18:53:32 +0200 |
commit | 8432749db7afecc9beea20f993cc036418caaa15 (patch) | |
tree | 10dd3fcd755bd7bdc27eef120885c7e700ab4288 /src/core/hle/kernel/wait_object.cpp | |
parent | Merge pull request #2907 from Subv/warnings3 (diff) | |
download | yuzu-8432749db7afecc9beea20f993cc036418caaa15.tar yuzu-8432749db7afecc9beea20f993cc036418caaa15.tar.gz yuzu-8432749db7afecc9beea20f993cc036418caaa15.tar.bz2 yuzu-8432749db7afecc9beea20f993cc036418caaa15.tar.lz yuzu-8432749db7afecc9beea20f993cc036418caaa15.tar.xz yuzu-8432749db7afecc9beea20f993cc036418caaa15.tar.zst yuzu-8432749db7afecc9beea20f993cc036418caaa15.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/kernel/wait_object.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/core/hle/kernel/wait_object.cpp b/src/core/hle/kernel/wait_object.cpp index f245eda6c..1ced26905 100644 --- a/src/core/hle/kernel/wait_object.cpp +++ b/src/core/hle/kernel/wait_object.cpp @@ -71,23 +71,20 @@ void WaitObject::WakeupAllWaitingThreads() { while (auto thread = GetHighestPriorityReadyThread()) { if (!thread->IsSleepingOnWaitAll()) { Acquire(thread.get()); - // Set the output index of the WaitSynchronizationN call to the index of this object. - if (thread->wait_set_output) { - thread->SetWaitSynchronizationOutput(thread->GetWaitObjectIndex(this)); - thread->wait_set_output = false; - } } else { for (auto& object : thread->wait_objects) { object->Acquire(thread.get()); } - // Note: This case doesn't update the output index of WaitSynchronizationN. } + // Invoke the wakeup callback before clearing the wait objects + if (thread->wakeup_callback) + thread->wakeup_callback(ThreadWakeupReason::Signal, thread, this); + for (auto& object : thread->wait_objects) object->RemoveWaitingThread(thread.get()); thread->wait_objects.clear(); - thread->SetWaitSynchronizationResult(RESULT_SUCCESS); thread->ResumeFromWait(); } } |