aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/synchronization.cpp
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2020-03-03 13:37:11 -0400
committerFernando Sahmkow <fsahmkow27@gmail.com>2020-06-27 11:35:23 -0400
commitb4dc01f16affe4baa9a7ab5ac4b240e03c03ae67 (patch)
tree3bd41c8e286ed564213b9a580e4df875f2687e25 /src/core/hle/kernel/synchronization.cpp
parent75e10578f12cf64bd734388ba80b5f5a46ca6133 (diff)
Kernel: Correct Signal on Thread Death and Setup Sync Objects on Thread for Debugging
Diffstat (limited to 'src/core/hle/kernel/synchronization.cpp')
-rw-r--r--src/core/hle/kernel/synchronization.cpp3
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));
}