kern: fix incorrect waiter management in KProcess::ReleaseUserException

This commit is contained in:
Michael Scire 2021-07-13 05:27:19 -07:00
parent 1be74ea6e2
commit 3bedf56512

View File

@ -804,7 +804,7 @@ namespace ams::kern {
/* Remove waiter thread. */
s32 num_waiters;
if (KThread *next = thread->RemoveWaiterByKey(std::addressof(num_waiters), reinterpret_cast<uintptr_t>(std::addressof(m_exception_thread))); next != nullptr) {
if (KThread *next = thread->RemoveWaiterByKey(std::addressof(num_waiters), reinterpret_cast<uintptr_t>(std::addressof(m_exception_thread)) | 1); next != nullptr) {
next->SetState(KThread::ThreadState_Runnable);
}