summaryrefslogtreecommitdiff
path: root/src/core/hle
diff options
context:
space:
mode:
authorGravatar Fernando Sahmkow2020-03-07 13:37:47 -0400
committerGravatar Fernando Sahmkow2020-06-27 11:35:36 -0400
commit535c542d84ea56b5710bf84af3fba6272913f48e (patch)
treebaf3236ce4b9341b8f11e450be7e8b39ad67d524 /src/core/hle
parentScheduler: Remove arm_interface lock and a few corrections. (diff)
downloadyuzu-535c542d84ea56b5710bf84af3fba6272913f48e.tar.gz
yuzu-535c542d84ea56b5710bf84af3fba6272913f48e.tar.xz
yuzu-535c542d84ea56b5710bf84af3fba6272913f48e.zip
SVC: WaitSynchronization add Termination Pending Result.
Diffstat (limited to 'src/core/hle')
-rw-r--r--src/core/hle/kernel/errors.h1
-rw-r--r--src/core/hle/kernel/synchronization.cpp5
2 files changed, 5 insertions, 1 deletions
diff --git a/src/core/hle/kernel/errors.h b/src/core/hle/kernel/errors.h
index 29bfa3621..d4e5d88cf 100644
--- a/src/core/hle/kernel/errors.h
+++ b/src/core/hle/kernel/errors.h
@@ -12,6 +12,7 @@ namespace Kernel {
12 12
13constexpr ResultCode ERR_MAX_CONNECTIONS_REACHED{ErrorModule::Kernel, 7}; 13constexpr ResultCode ERR_MAX_CONNECTIONS_REACHED{ErrorModule::Kernel, 7};
14constexpr ResultCode ERR_INVALID_CAPABILITY_DESCRIPTOR{ErrorModule::Kernel, 14}; 14constexpr ResultCode ERR_INVALID_CAPABILITY_DESCRIPTOR{ErrorModule::Kernel, 14};
15constexpr ResultCode ERR_THREAD_TERMINATING{ErrorModule::Kernel, 59};
15constexpr ResultCode ERR_INVALID_SIZE{ErrorModule::Kernel, 101}; 16constexpr ResultCode ERR_INVALID_SIZE{ErrorModule::Kernel, 101};
16constexpr ResultCode ERR_INVALID_ADDRESS{ErrorModule::Kernel, 102}; 17constexpr ResultCode ERR_INVALID_ADDRESS{ErrorModule::Kernel, 102};
17constexpr ResultCode ERR_OUT_OF_RESOURCES{ErrorModule::Kernel, 103}; 18constexpr ResultCode ERR_OUT_OF_RESOURCES{ErrorModule::Kernel, 103};
diff --git a/src/core/hle/kernel/synchronization.cpp b/src/core/hle/kernel/synchronization.cpp
index a7e3fbe92..4323fc120 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(
59 return {RESULT_TIMEOUT, InvalidHandle}; 59 return {RESULT_TIMEOUT, InvalidHandle};
60 } 60 }
61 61
62 /// TODO(Blinkhawk): Check for termination pending 62 if (thread->IsPendingTermination()) {
63 lock.CancelSleep();
64 return {ERR_THREAD_TERMINATING, InvalidHandle};
65 }
63 66
64 if (thread->IsSyncCancelled()) { 67 if (thread->IsSyncCancelled()) {
65 thread->SetSyncCancelled(false); 68 thread->SetSyncCancelled(false);