aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/synchronization.cpp
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2020-03-07 13:37:47 -0400
committerFernando Sahmkow <fsahmkow27@gmail.com>2020-06-27 11:35:36 -0400
commit535c542d84ea56b5710bf84af3fba6272913f48e (patch)
treebaf3236ce4b9341b8f11e450be7e8b39ad67d524 /src/core/hle/kernel/synchronization.cpp
parent725bac14044b2645b9ce912d1b1e2c9c2a96818b (diff)
SVC: WaitSynchronization add Termination Pending Result.
Diffstat (limited to 'src/core/hle/kernel/synchronization.cpp')
-rw-r--r--src/core/hle/kernel/synchronization.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/hle/kernel/synchronization.cpp b/src/core/hle/kernel/synchronization.cpp
index a7e3fbe92f..4323fc1208 100644
--- a/src/core/hle/kernel/synchronization.cpp
+++ b/src/core/hle/kernel/synchronization.cpp
@@ -59,7 +59,10 @@ std::pair<ResultCode, Handle> Synchronization::WaitFor(
return {RESULT_TIMEOUT, InvalidHandle};
}
- /// TODO(Blinkhawk): Check for termination pending
+ if (thread->IsPendingTermination()) {
+ lock.CancelSleep();
+ return {ERR_THREAD_TERMINATING, InvalidHandle};
+ }
if (thread->IsSyncCancelled()) {
thread->SetSyncCancelled(false);