mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-24 19:54:22 -04:00
kern: fix missing scheduler updates in KLightLock/Exception, fix RequestScheduleOnInterrupt
This commit is contained in:
parent
920b017677
commit
e1bd6fb874
9 changed files with 64 additions and 56 deletions
|
@ -37,10 +37,13 @@ namespace ams::kern {
|
|||
/* Set thread states. */
|
||||
if (AMS_LIKELY(cur_thread->GetState() == KThread::ThreadState_Runnable)) {
|
||||
cur_thread->SetState(KThread::ThreadState_Waiting);
|
||||
} else {
|
||||
KScheduler::SetSchedulerUpdateNeeded();
|
||||
}
|
||||
|
||||
if (owner_thread->IsSuspended()) {
|
||||
owner_thread->ContinueIfHasKernelWaiters();
|
||||
KScheduler::SetSchedulerUpdateNeeded();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -75,6 +78,8 @@ namespace ams::kern {
|
|||
|
||||
if (AMS_LIKELY(next_owner->GetState() == KThread::ThreadState_Waiting)) {
|
||||
next_owner->SetState(KThread::ThreadState_Runnable);
|
||||
} else {
|
||||
KScheduler::SetSchedulerUpdateNeeded();
|
||||
}
|
||||
|
||||
if (next_owner->IsSuspended()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue