diff options
author | bunnei <bunneidev@gmail.com> | 2015-01-18 04:23:49 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2015-01-22 01:10:24 +0100 |
commit | aa01c57ae9d73e41b65d37860ca6fbb91caba33a (patch) | |
tree | 904936860b1e8319ec5edc3a1e0e6c2c12f01d9f /src/core/hle/svc.cpp | |
parent | WaitSynchronizationN: Handle case where handles=nullptr. (diff) | |
download | yuzu-aa01c57ae9d73e41b65d37860ca6fbb91caba33a.tar yuzu-aa01c57ae9d73e41b65d37860ca6fbb91caba33a.tar.gz yuzu-aa01c57ae9d73e41b65d37860ca6fbb91caba33a.tar.bz2 yuzu-aa01c57ae9d73e41b65d37860ca6fbb91caba33a.tar.lz yuzu-aa01c57ae9d73e41b65d37860ca6fbb91caba33a.tar.xz yuzu-aa01c57ae9d73e41b65d37860ca6fbb91caba33a.tar.zst yuzu-aa01c57ae9d73e41b65d37860ca6fbb91caba33a.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/svc.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp index 23885f129..a27aa6269 100644 --- a/src/core/hle/svc.cpp +++ b/src/core/hle/svc.cpp @@ -127,7 +127,7 @@ 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->WaitSynchronization(); + ResultVal<bool> wait = object->Wait(); // Check for next thread to schedule if (wait.Succeeded() && *wait) { @@ -137,6 +137,8 @@ static Result WaitSynchronization1(Handle handle, s64 nano_seconds) { Kernel::GetCurrentThread()->SetWaitAll(false); HLE::Reschedule(__func__); + } else { + object->Acquire(); } return wait.Code().raw; @@ -163,15 +165,14 @@ static Result WaitSynchronizationN(s32* out, Handle* handles, s32 handle_count, if (object == nullptr) return InvalidHandle(ErrorModule::Kernel).raw; - ResultVal<bool> wait = object->WaitSynchronization(handle_index); + ResultVal<bool> wait = object->Wait(handle_index); wait_thread = (wait.Succeeded() && *wait); // If this object waited and we are waiting on all objects to synchronize - if (wait_thread && wait_all) { + if (wait_thread && wait_all) // Enforce later on that this thread does not continue wait_all_succeeded = true; - } // If this object synchronized and we are not waiting on all objects to synchronize if (!wait_thread && !wait_all) |