summaryrefslogtreecommitdiffstats
path: root/src/core/hle/svc.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2015-01-21 00:16:45 +0100
committerbunnei <bunneidev@gmail.com>2015-01-22 02:47:49 +0100
commit15b6a4d9add6b260a2a1a84ab6228addced4f851 (patch)
treee9934863ebd6483cabae0f6c280fab7e34eee32e /src/core/hle/svc.cpp
parentWaitObject: Renamed "Wait" to "ShouldWait", made "ShouldWait" and "Acquire" pure virtual. (diff)
downloadyuzu-15b6a4d9add6b260a2a1a84ab6228addced4f851.tar
yuzu-15b6a4d9add6b260a2a1a84ab6228addced4f851.tar.gz
yuzu-15b6a4d9add6b260a2a1a84ab6228addced4f851.tar.bz2
yuzu-15b6a4d9add6b260a2a1a84ab6228addced4f851.tar.lz
yuzu-15b6a4d9add6b260a2a1a84ab6228addced4f851.tar.xz
yuzu-15b6a4d9add6b260a2a1a84ab6228addced4f851.tar.zst
yuzu-15b6a4d9add6b260a2a1a84ab6228addced4f851.zip
Diffstat (limited to '')
-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) {
LOG_TRACE(Kernel_SVC, "called handle=0x%08X(%s:%s), nanoseconds=%lld", handle,
object->GetTypeName().c_str(), object->GetName().c_str(), nano_seconds);
- ResultVal<bool> wait = object->ShouldWait();
-
// Check for next thread to schedule
- if (wait.Succeeded() && *wait) {
+ if (object->ShouldWait()) {
object->AddWaitingThread(Kernel::GetCurrentThread());
Kernel::WaitCurrentThread_WaitSynchronization(object);
@@ -138,7 +136,7 @@ static Result WaitSynchronization1(Handle handle, s64 nano_seconds) {
object->Acquire();
}
- return wait.Code().raw;
+ return RESULT_SUCCESS.raw;
}
/// 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,
if (object == nullptr)
return InvalidHandle(ErrorModule::Kernel).raw;
- ResultVal<bool> wait = object->ShouldWait();
-
// Check if the current thread should wait on this object...
- if (wait.Succeeded() && *wait) {
+ if (object->ShouldWait()) {
// Check we are waiting on all objects...
if (wait_all)