diff options
author | bunnei <bunneidev@gmail.com> | 2021-06-11 20:03:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-11 20:03:55 +0200 |
commit | 0c0c1a039ec73937db4bc24e0bcbc478e3e6704b (patch) | |
tree | 54b9110b9b80047ed0bebd3982fdfccc51dda76d /src/core/hle/kernel/k_process.cpp | |
parent | Merge pull request #6450 from lat9nq/update-sdl (diff) | |
parent | kernel: Unconditionally set thread state when appropriate (diff) | |
download | yuzu-0c0c1a039ec73937db4bc24e0bcbc478e3e6704b.tar yuzu-0c0c1a039ec73937db4bc24e0bcbc478e3e6704b.tar.gz yuzu-0c0c1a039ec73937db4bc24e0bcbc478e3e6704b.tar.bz2 yuzu-0c0c1a039ec73937db4bc24e0bcbc478e3e6704b.tar.lz yuzu-0c0c1a039ec73937db4bc24e0bcbc478e3e6704b.tar.xz yuzu-0c0c1a039ec73937db4bc24e0bcbc478e3e6704b.tar.zst yuzu-0c0c1a039ec73937db4bc24e0bcbc478e3e6704b.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/kernel/k_process.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/core/hle/kernel/k_process.cpp b/src/core/hle/kernel/k_process.cpp index 06b8ce151..d1bd98051 100644 --- a/src/core/hle/kernel/k_process.cpp +++ b/src/core/hle/kernel/k_process.cpp @@ -201,17 +201,15 @@ bool KProcess::ReleaseUserException(KThread* thread) { // Remove waiter thread. s32 num_waiters{}; - KThread* next = thread->RemoveWaiterByKey( - std::addressof(num_waiters), - reinterpret_cast<uintptr_t>(std::addressof(exception_thread))); - if (next != nullptr) { - if (next->GetState() == ThreadState::Waiting) { - next->SetState(ThreadState::Runnable); - } else { - KScheduler::SetSchedulerUpdateNeeded(kernel); - } + if (KThread* next = thread->RemoveWaiterByKey( + std::addressof(num_waiters), + reinterpret_cast<uintptr_t>(std::addressof(exception_thread))); + next != nullptr) { + next->SetState(ThreadState::Runnable); } + KScheduler::SetSchedulerUpdateNeeded(kernel); + return true; } else { return false; |