diff options
author | Liam <byteslice@airmail.cc> | 2023-03-07 06:13:05 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2023-03-13 03:09:08 +0100 |
commit | 91fd4e30f2a12868201b08e73de299db1c3d116a (patch) | |
tree | ac85044f0554995ef6af3a3d9a4508286c2b95b3 /src/core/hle/kernel/svc/svc_synchronization.cpp | |
parent | kernel: convert miscellaneous (diff) | |
download | yuzu-91fd4e30f2a12868201b08e73de299db1c3d116a.tar yuzu-91fd4e30f2a12868201b08e73de299db1c3d116a.tar.gz yuzu-91fd4e30f2a12868201b08e73de299db1c3d116a.tar.bz2 yuzu-91fd4e30f2a12868201b08e73de299db1c3d116a.tar.lz yuzu-91fd4e30f2a12868201b08e73de299db1c3d116a.tar.xz yuzu-91fd4e30f2a12868201b08e73de299db1c3d116a.tar.zst yuzu-91fd4e30f2a12868201b08e73de299db1c3d116a.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/kernel/svc/svc_synchronization.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/core/hle/kernel/svc/svc_synchronization.cpp b/src/core/hle/kernel/svc/svc_synchronization.cpp index 9e7bf9530..660b45c23 100644 --- a/src/core/hle/kernel/svc/svc_synchronization.cpp +++ b/src/core/hle/kernel/svc/svc_synchronization.cpp @@ -17,7 +17,7 @@ Result CloseHandle(Core::System& system, Handle handle) { R_UNLESS(GetCurrentProcess(system.Kernel()).GetHandleTable().Remove(handle), ResultInvalidHandle); - return ResultSuccess; + R_SUCCEED(); } /// Clears the signaled state of an event or process. @@ -31,7 +31,7 @@ Result ResetSignal(Core::System& system, Handle handle) { { KScopedAutoObject readable_event = handle_table.GetObject<KReadableEvent>(handle); if (readable_event.IsNotNull()) { - return readable_event->Reset(); + R_RETURN(readable_event->Reset()); } } @@ -39,13 +39,11 @@ Result ResetSignal(Core::System& system, Handle handle) { { KScopedAutoObject process = handle_table.GetObject<KProcess>(handle); if (process.IsNotNull()) { - return process->Reset(); + R_RETURN(process->Reset()); } } - LOG_ERROR(Kernel_SVC, "invalid handle (0x{:08X})", handle); - - return ResultInvalidHandle; + R_THROW(ResultInvalidHandle); } static Result WaitSynchronization(Core::System& system, int32_t* out_index, const Handle* handles, @@ -109,7 +107,7 @@ Result CancelSynchronization(Core::System& system, Handle handle) { // Cancel the thread's wait. thread->WaitCancel(); - return ResultSuccess; + R_SUCCEED(); } void SynchronizePreemptionState(Core::System& system) { |