mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-22 14:52:45 +01:00
SVC: WaitSynchronization add Termination Pending Result.
This commit is contained in:
parent
725bac1404
commit
535c542d84
2 changed files with 5 additions and 1 deletions
|
@ -12,6 +12,7 @@ namespace Kernel {
|
|||
|
||||
constexpr ResultCode ERR_MAX_CONNECTIONS_REACHED{ErrorModule::Kernel, 7};
|
||||
constexpr ResultCode ERR_INVALID_CAPABILITY_DESCRIPTOR{ErrorModule::Kernel, 14};
|
||||
constexpr ResultCode ERR_THREAD_TERMINATING{ErrorModule::Kernel, 59};
|
||||
constexpr ResultCode ERR_INVALID_SIZE{ErrorModule::Kernel, 101};
|
||||
constexpr ResultCode ERR_INVALID_ADDRESS{ErrorModule::Kernel, 102};
|
||||
constexpr ResultCode ERR_OUT_OF_RESOURCES{ErrorModule::Kernel, 103};
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue