summaryrefslogtreecommitdiff
path: root/src/core/hle/svc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/svc.cpp')
-rw-r--r--src/core/hle/svc.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp
index fd2d22727..f6c912502 100644
--- a/src/core/hle/svc.cpp
+++ b/src/core/hle/svc.cpp
@@ -122,10 +122,8 @@ static Result WaitSynchronization1(Handle handle, s64 nano_seconds) {
122 LOG_TRACE(Kernel_SVC, "called handle=0x%08X(%s:%s), nanoseconds=%lld", handle, 122 LOG_TRACE(Kernel_SVC, "called handle=0x%08X(%s:%s), nanoseconds=%lld", handle,
123 object->GetTypeName().c_str(), object->GetName().c_str(), nano_seconds); 123 object->GetTypeName().c_str(), object->GetName().c_str(), nano_seconds);
124 124
125 ResultVal<bool> wait = object->ShouldWait();
126
127 // Check for next thread to schedule 125 // Check for next thread to schedule
128 if (wait.Succeeded() && *wait) { 126 if (object->ShouldWait()) {
129 127
130 object->AddWaitingThread(Kernel::GetCurrentThread()); 128 object->AddWaitingThread(Kernel::GetCurrentThread());
131 Kernel::WaitCurrentThread_WaitSynchronization(object); 129 Kernel::WaitCurrentThread_WaitSynchronization(object);
@@ -138,7 +136,7 @@ static Result WaitSynchronization1(Handle handle, s64 nano_seconds) {
138 object->Acquire(); 136 object->Acquire();
139 } 137 }
140 138
141 return wait.Code().raw; 139 return RESULT_SUCCESS.raw;
142} 140}
143 141
144/// Wait for the given handles to synchronize, timeout after the specified nanoseconds 142/// Wait for the given handles to synchronize, timeout after the specified nanoseconds
@@ -167,10 +165,8 @@ static Result WaitSynchronizationN(s32* out, Handle* handles, s32 handle_count,
167 if (object == nullptr) 165 if (object == nullptr)
168 return InvalidHandle(ErrorModule::Kernel).raw; 166 return InvalidHandle(ErrorModule::Kernel).raw;
169 167
170 ResultVal<bool> wait = object->ShouldWait();
171
172 // Check if the current thread should wait on this object... 168 // Check if the current thread should wait on this object...
173 if (wait.Succeeded() && *wait) { 169 if (object->ShouldWait()) {
174 170
175 // Check we are waiting on all objects... 171 // Check we are waiting on all objects...
176 if (wait_all) 172 if (wait_all)