diff options
Diffstat (limited to 'src/core/hle/svc.cpp')
| -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) { | |||
| 127 | LOG_TRACE(Kernel_SVC, "called handle=0x%08X(%s:%s), nanoseconds=%lld", handle, | 127 | LOG_TRACE(Kernel_SVC, "called handle=0x%08X(%s:%s), nanoseconds=%lld", handle, |
| 128 | object->GetTypeName().c_str(), object->GetName().c_str(), nano_seconds); | 128 | object->GetTypeName().c_str(), object->GetName().c_str(), nano_seconds); |
| 129 | 129 | ||
| 130 | ResultVal<bool> wait = object->WaitSynchronization(); | 130 | ResultVal<bool> wait = object->Wait(); |
| 131 | 131 | ||
| 132 | // Check for next thread to schedule | 132 | // Check for next thread to schedule |
| 133 | if (wait.Succeeded() && *wait) { | 133 | if (wait.Succeeded() && *wait) { |
| @@ -137,6 +137,8 @@ static Result WaitSynchronization1(Handle handle, s64 nano_seconds) { | |||
| 137 | Kernel::GetCurrentThread()->SetWaitAll(false); | 137 | Kernel::GetCurrentThread()->SetWaitAll(false); |
| 138 | 138 | ||
| 139 | HLE::Reschedule(__func__); | 139 | HLE::Reschedule(__func__); |
| 140 | } else { | ||
| 141 | object->Acquire(); | ||
| 140 | } | 142 | } |
| 141 | 143 | ||
| 142 | return wait.Code().raw; | 144 | return wait.Code().raw; |
| @@ -163,15 +165,14 @@ static Result WaitSynchronizationN(s32* out, Handle* handles, s32 handle_count, | |||
| 163 | if (object == nullptr) | 165 | if (object == nullptr) |
| 164 | return InvalidHandle(ErrorModule::Kernel).raw; | 166 | return InvalidHandle(ErrorModule::Kernel).raw; |
| 165 | 167 | ||
| 166 | ResultVal<bool> wait = object->WaitSynchronization(handle_index); | 168 | ResultVal<bool> wait = object->Wait(handle_index); |
| 167 | 169 | ||
| 168 | wait_thread = (wait.Succeeded() && *wait); | 170 | wait_thread = (wait.Succeeded() && *wait); |
| 169 | 171 | ||
| 170 | // If this object waited and we are waiting on all objects to synchronize | 172 | // If this object waited and we are waiting on all objects to synchronize |
| 171 | if (wait_thread && wait_all) { | 173 | if (wait_thread && wait_all) |
| 172 | // Enforce later on that this thread does not continue | 174 | // Enforce later on that this thread does not continue |
| 173 | wait_all_succeeded = true; | 175 | wait_all_succeeded = true; |
| 174 | } | ||
| 175 | 176 | ||
| 176 | // If this object synchronized and we are not waiting on all objects to synchronize | 177 | // If this object synchronized and we are not waiting on all objects to synchronize |
| 177 | if (!wait_thread && !wait_all) | 178 | if (!wait_thread && !wait_all) |