summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/k_process.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-06-11 20:03:55 +0200
committerGitHub <noreply@github.com>2021-06-11 20:03:55 +0200
commit0c0c1a039ec73937db4bc24e0bcbc478e3e6704b (patch)
tree54b9110b9b80047ed0bebd3982fdfccc51dda76d /src/core/hle/kernel/k_process.cpp
parentMerge pull request #6450 from lat9nq/update-sdl (diff)
parentkernel: Unconditionally set thread state when appropriate (diff)
downloadyuzu-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.cpp16
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;