From 91fd4e30f2a12868201b08e73de299db1c3d116a Mon Sep 17 00:00:00 2001 From: Liam Date: Tue, 7 Mar 2023 00:13:05 -0500 Subject: kernel/svc: convert to new style --- src/core/hle/kernel/svc/svc_synchronization.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/core/hle/kernel/svc/svc_synchronization.cpp') 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(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(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) { -- cgit v1.2.3