diff options
author | Lioncash <mathew1800@gmail.com> | 2018-10-04 00:47:57 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2018-10-04 06:14:15 +0200 |
commit | baed7e1fba99c3f1932c6a41ad1496d1b6490a5a (patch) | |
tree | 004a9784a05294531e2f3975205f856a96b1a1ef /src/core/hle/kernel/kernel.cpp | |
parent | Merge pull request #1330 from raven02/tlds (diff) | |
download | yuzu-baed7e1fba99c3f1932c6a41ad1496d1b6490a5a.tar yuzu-baed7e1fba99c3f1932c6a41ad1496d1b6490a5a.tar.gz yuzu-baed7e1fba99c3f1932c6a41ad1496d1b6490a5a.tar.bz2 yuzu-baed7e1fba99c3f1932c6a41ad1496d1b6490a5a.tar.lz yuzu-baed7e1fba99c3f1932c6a41ad1496d1b6490a5a.tar.xz yuzu-baed7e1fba99c3f1932c6a41ad1496d1b6490a5a.tar.zst yuzu-baed7e1fba99c3f1932c6a41ad1496d1b6490a5a.zip |
Diffstat (limited to 'src/core/hle/kernel/kernel.cpp')
-rw-r--r-- | src/core/hle/kernel/kernel.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp index 3e0800a71..98eb74298 100644 --- a/src/core/hle/kernel/kernel.cpp +++ b/src/core/hle/kernel/kernel.cpp @@ -46,40 +46,40 @@ static void ThreadWakeupCallback(u64 thread_handle, [[maybe_unused]] int cycles_ bool resume = true; - if (thread->status == ThreadStatus::WaitSynchAny || - thread->status == ThreadStatus::WaitSynchAll || - thread->status == ThreadStatus::WaitHLEEvent) { + if (thread->GetStatus() == ThreadStatus::WaitSynchAny || + thread->GetStatus() == ThreadStatus::WaitSynchAll || + thread->GetStatus() == ThreadStatus::WaitHLEEvent) { // Remove the thread from each of its waiting objects' waitlists - for (auto& object : thread->wait_objects) { + for (const auto& object : thread->GetWaitObjects()) { object->RemoveWaitingThread(thread.get()); } - thread->wait_objects.clear(); + thread->ClearWaitObjects(); // Invoke the wakeup callback before clearing the wait objects - if (thread->wakeup_callback) { - resume = thread->wakeup_callback(ThreadWakeupReason::Timeout, thread, nullptr, 0); + if (thread->HasWakeupCallback()) { + resume = thread->InvokeWakeupCallback(ThreadWakeupReason::Timeout, thread, nullptr, 0); } } - if (thread->mutex_wait_address != 0 || thread->condvar_wait_address != 0 || - thread->wait_handle) { - ASSERT(thread->status == ThreadStatus::WaitMutex); - thread->mutex_wait_address = 0; - thread->condvar_wait_address = 0; - thread->wait_handle = 0; + if (thread->GetMutexWaitAddress() != 0 || thread->GetCondVarWaitAddress() != 0 || + thread->GetWaitHandle() != 0) { + ASSERT(thread->GetStatus() == ThreadStatus::WaitMutex); + thread->SetMutexWaitAddress(0); + thread->SetCondVarWaitAddress(0); + thread->SetWaitHandle(0); - auto lock_owner = thread->lock_owner; + auto* const lock_owner = thread->GetLockOwner(); // Threads waking up by timeout from WaitProcessWideKey do not perform priority inheritance // and don't have a lock owner unless SignalProcessWideKey was called first and the thread // wasn't awakened due to the mutex already being acquired. - if (lock_owner) { + if (lock_owner != nullptr) { lock_owner->RemoveMutexWaiter(thread); } } - if (thread->arb_wait_address != 0) { - ASSERT(thread->status == ThreadStatus::WaitArb); - thread->arb_wait_address = 0; + if (thread->GetArbiterWaitAddress() != 0) { + ASSERT(thread->GetStatus() == ThreadStatus::WaitArb); + thread->SetArbiterWaitAddress(0); } if (resume) { |