diff options
| author | 2015-01-20 18:16:45 -0500 | |
|---|---|---|
| committer | 2015-01-21 20:47:49 -0500 | |
| commit | 15b6a4d9add6b260a2a1a84ab6228addced4f851 (patch) | |
| tree | e9934863ebd6483cabae0f6c280fab7e34eee32e /src/core/hle/svc.cpp | |
| parent | WaitObject: Renamed "Wait" to "ShouldWait", made "ShouldWait" and "Acquire" p... (diff) | |
| download | yuzu-15b6a4d9add6b260a2a1a84ab6228addced4f851.tar.gz yuzu-15b6a4d9add6b260a2a1a84ab6228addced4f851.tar.xz yuzu-15b6a4d9add6b260a2a1a84ab6228addced4f851.zip | |
Kernel: Changed "ShouldWait" to return bool and "Acquire" to return void.
Diffstat (limited to 'src/core/hle/svc.cpp')
| -rw-r--r-- | src/core/hle/svc.cpp | 10 |
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) |