summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/svc/svc_synchronization.cpp
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2023-07-15 04:32:24 +0200
committerLiam <byteslice@airmail.cc>2023-07-22 17:19:29 +0200
commit9f3f615e054663fd6e538fa2db86271b467a6bfd (patch)
tree1c826b4de5fc2b51cbade16a6fedb969df8b437d /src/core/hle/kernel/svc/svc_synchronization.cpp
parentmemory: minimize dependency on process (diff)
downloadyuzu-9f3f615e054663fd6e538fa2db86271b467a6bfd.tar
yuzu-9f3f615e054663fd6e538fa2db86271b467a6bfd.tar.gz
yuzu-9f3f615e054663fd6e538fa2db86271b467a6bfd.tar.bz2
yuzu-9f3f615e054663fd6e538fa2db86271b467a6bfd.tar.lz
yuzu-9f3f615e054663fd6e538fa2db86271b467a6bfd.tar.xz
yuzu-9f3f615e054663fd6e538fa2db86271b467a6bfd.tar.zst
yuzu-9f3f615e054663fd6e538fa2db86271b467a6bfd.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/kernel/svc/svc_synchronization.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/core/hle/kernel/svc/svc_synchronization.cpp b/src/core/hle/kernel/svc/svc_synchronization.cpp
index f02d03f30..366e8ed4a 100644
--- a/src/core/hle/kernel/svc/svc_synchronization.cpp
+++ b/src/core/hle/kernel/svc/svc_synchronization.cpp
@@ -7,6 +7,7 @@
#include "core/hle/kernel/k_process.h"
#include "core/hle/kernel/k_readable_event.h"
#include "core/hle/kernel/svc.h"
+#include "core/hle/kernel/svc_results.h"
namespace Kernel::Svc {
@@ -64,14 +65,10 @@ Result WaitSynchronization(Core::System& system, int32_t* out_index, u64 user_ha
// Copy user handles.
if (num_handles > 0) {
- // Ensure we can try to get the handles.
- R_UNLESS(GetCurrentMemory(kernel).IsValidVirtualAddressRange(
- user_handles, static_cast<u64>(sizeof(Handle) * num_handles)),
- ResultInvalidPointer);
-
// Get the handles.
- GetCurrentMemory(kernel).ReadBlock(user_handles, handles.data(),
- sizeof(Handle) * num_handles);
+ R_UNLESS(GetCurrentMemory(kernel).ReadBlock(user_handles, handles.data(),
+ sizeof(Handle) * num_handles),
+ ResultInvalidPointer);
// Convert the handles to objects.
R_UNLESS(handle_table.GetMultipleObjects<KSynchronizationObject>(