diff options
author | Liam <byteslice@airmail.cc> | 2022-06-25 19:36:14 +0200 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2022-06-25 19:36:14 +0200 |
commit | 075155022e90138b4ad99f98eeef95cd30ce32d3 (patch) | |
tree | 724e5eb2005139de632e0ff3b761b818ff9dfbdc /src/core/hle | |
parent | Merge pull request #8491 from Morph1984/extra-assert (diff) | |
download | yuzu-075155022e90138b4ad99f98eeef95cd30ce32d3.tar yuzu-075155022e90138b4ad99f98eeef95cd30ce32d3.tar.gz yuzu-075155022e90138b4ad99f98eeef95cd30ce32d3.tar.bz2 yuzu-075155022e90138b4ad99f98eeef95cd30ce32d3.tar.lz yuzu-075155022e90138b4ad99f98eeef95cd30ce32d3.tar.xz yuzu-075155022e90138b4ad99f98eeef95cd30ce32d3.tar.zst yuzu-075155022e90138b4ad99f98eeef95cd30ce32d3.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/kernel/k_process.cpp | 2 | ||||
-rw-r--r-- | src/core/hle/kernel/k_thread.cpp | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/core/hle/kernel/k_process.cpp b/src/core/hle/kernel/k_process.cpp index cb84c20e3..77356e592 100644 --- a/src/core/hle/kernel/k_process.cpp +++ b/src/core/hle/kernel/k_process.cpp @@ -161,7 +161,7 @@ bool KProcess::ReleaseUserException(KThread* thread) { std::addressof(num_waiters), reinterpret_cast<uintptr_t>(std::addressof(exception_thread))); next != nullptr) { - next->SetState(ThreadState::Runnable); + next->EndWait(ResultSuccess); } KScheduler::SetSchedulerUpdateNeeded(kernel); diff --git a/src/core/hle/kernel/k_thread.cpp b/src/core/hle/kernel/k_thread.cpp index c0a091bb6..e1bdd6c2c 100644 --- a/src/core/hle/kernel/k_thread.cpp +++ b/src/core/hle/kernel/k_thread.cpp @@ -487,9 +487,7 @@ void KThread::Unpin() { // Resume any threads that began waiting on us while we were pinned. for (auto it = pinned_waiter_list.begin(); it != pinned_waiter_list.end(); ++it) { - if (it->GetState() == ThreadState::Waiting) { - it->SetState(ThreadState::Runnable); - } + it->EndWait(ResultSuccess); } } @@ -884,6 +882,7 @@ void KThread::AddWaiterImpl(KThread* thread) { // Keep track of how many kernel waiters we have. if (IsKernelAddressKey(thread->GetAddressKey())) { ASSERT((num_kernel_waiters++) >= 0); + KScheduler::SetSchedulerUpdateNeeded(kernel); } // Insert the waiter. @@ -897,6 +896,7 @@ void KThread::RemoveWaiterImpl(KThread* thread) { // Keep track of how many kernel waiters we have. if (IsKernelAddressKey(thread->GetAddressKey())) { ASSERT((num_kernel_waiters--) > 0); + KScheduler::SetSchedulerUpdateNeeded(kernel); } // Remove the waiter. @@ -972,6 +972,7 @@ KThread* KThread::RemoveWaiterByKey(s32* out_num_waiters, VAddr key) { // Keep track of how many kernel waiters we have. if (IsKernelAddressKey(thread->GetAddressKey())) { ASSERT((num_kernel_waiters--) > 0); + KScheduler::SetSchedulerUpdateNeeded(kernel); } it = waiter_list.erase(it); |