summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/svc/svc_synchronization.cpp
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2023-03-13 14:16:16 +0100
committerGitHub <noreply@github.com>2023-03-13 14:16:16 +0100
commit1f952f6ac9e3aca3dba8e4286fe937616081a767 (patch)
treeca57513605bdef4767762614c074ca90b7791575 /src/core/hle/kernel/svc/svc_synchronization.cpp
parentMerge pull request #9942 from liamwhite/speling (diff)
parentkernel: additional style fixes to KThread, KProcess (diff)
downloadyuzu-1f952f6ac9e3aca3dba8e4286fe937616081a767.tar
yuzu-1f952f6ac9e3aca3dba8e4286fe937616081a767.tar.gz
yuzu-1f952f6ac9e3aca3dba8e4286fe937616081a767.tar.bz2
yuzu-1f952f6ac9e3aca3dba8e4286fe937616081a767.tar.lz
yuzu-1f952f6ac9e3aca3dba8e4286fe937616081a767.tar.xz
yuzu-1f952f6ac9e3aca3dba8e4286fe937616081a767.tar.zst
yuzu-1f952f6ac9e3aca3dba8e4286fe937616081a767.zip
Diffstat (limited to 'src/core/hle/kernel/svc/svc_synchronization.cpp')
-rw-r--r--src/core/hle/kernel/svc/svc_synchronization.cpp12
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) {