diff options
| author | Liam <byteslice@airmail.cc> | 2023-03-07 00:13:05 -0500 |
|---|---|---|
| committer | Liam <byteslice@airmail.cc> | 2023-03-12 22:09:08 -0400 |
| commit | 91fd4e30f2a12868201b08e73de299db1c3d116a (patch) | |
| tree | ac85044f0554995ef6af3a3d9a4508286c2b95b3 /src/core/hle/kernel/svc/svc_synchronization.cpp | |
| parent | 57f1d8ef8d8de7d93e46f6ec26811cfe4879249b (diff) | |
kernel/svc: convert to new style
Diffstat (limited to 'src/core/hle/kernel/svc/svc_synchronization.cpp')
| -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) { |
