diff options
Diffstat (limited to 'src/core/hle/kernel/svc/svc_synchronization.cpp')
| -rw-r--r-- | src/core/hle/kernel/svc/svc_synchronization.cpp | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/src/core/hle/kernel/svc/svc_synchronization.cpp b/src/core/hle/kernel/svc/svc_synchronization.cpp index 2f72f60215..2b019c52d1 100644 --- a/src/core/hle/kernel/svc/svc_synchronization.cpp +++ b/src/core/hle/kernel/svc/svc_synchronization.cpp @@ -15,24 +15,13 @@ namespace Kernel::Svc { -namespace { -void LogInvalidNativeSyncHandle(Core::System& system, const char* operation, Handle handle) { - if (!GetCurrentProcess(system.Kernel()).UsesPAuthReturns()) { return; } - const auto& context = GetCurrentThread(system.Kernel()).GetContext(); - LOG_DEBUG(Kernel_SVC, "native {} invalid handle={:#x}, pc={:#x}, lr={:#x}, fp={:#x}", - operation, handle, context.pc, context.lr, context.fp); -} -} - /// Close a handle Result CloseHandle(Core::System& system, Handle handle) { LOG_TRACE(Kernel_SVC, "Closing handle {:#08x}", handle); // Remove the handle. - if (!GetCurrentProcess(system.Kernel()).GetHandleTable().Remove(system.Kernel(), handle)) { - LogInvalidNativeSyncHandle(system, "CloseHandle", handle); - R_THROW(ResultInvalidHandle); - } + R_UNLESS(GetCurrentProcess(system.Kernel()).GetHandleTable().Remove(system.Kernel(), handle), + ResultInvalidHandle); R_SUCCEED(); } @@ -60,7 +49,6 @@ Result ResetSignal(Core::System& system, Handle handle) { } } - LogInvalidNativeSyncHandle(system, "ResetSignal", handle); R_THROW(ResultInvalidHandle); } @@ -84,10 +72,7 @@ Result WaitSynchronization(Core::System& system, int32_t* out_index, u64 user_ha R_UNLESS(GetCurrentMemory(system.Kernel()).ReadBlock(user_handles, handles.data(), sizeof(Handle) * num_handles), ResultInvalidPointer); // Convert the handles to objects. - if (!handle_table.GetMultipleObjects<KSynchronizationObject>(system.Kernel(), objs.data(), handles.data(), num_handles)) { - for (s32 i = 0; i < num_handles; ++i) { LogInvalidNativeSyncHandle(system, "WaitSynchronization set", handles[i]); } - R_THROW(ResultInvalidHandle); - } + R_UNLESS(handle_table.GetMultipleObjects<KSynchronizationObject>(system.Kernel(), objs.data(), handles.data(), num_handles), ResultInvalidHandle); } // Ensure handles are closed when we're done. |
