kern: fix missing scheduler updates in KLightLock/Exception, fix RequestScheduleOnInterrupt

This commit is contained in:
Michael Scire authored and SciresM committed 2020-08-18 15:17:40 -07:00
1 parent 920b017677
commit e1bd6fb874
9 files changed
+64 -56

No files matched your search

@@ -277,36 +277,6 @@ namespace ams::kern {
}
}
void KScheduler::PinCurrentThread(KProcess *cur_process) {
MESOSPHERE_ASSERT(IsSchedulerLockedByCurrentThread());
/* Get the current thread. */
const s32 core_id = GetCurrentCoreId();
KThread *cur_thread = GetCurrentThreadPointer();
/* Pin it. */
cur_process->PinThread(core_id, cur_thread);
cur_thread->Pin();
/* An update is needed. */
SetSchedulerUpdateNeeded();
}
void KScheduler::UnpinCurrentThread(KProcess *cur_process) {
MESOSPHERE_ASSERT(IsSchedulerLockedByCurrentThread());
/* Get the current thread. */
const s32 core_id = GetCurrentCoreId();
KThread *cur_thread = GetCurrentThreadPointer();
/* Unpin it. */
cur_thread->Unpin();
cur_process->UnpinThread(core_id, cur_thread);
/* An update is needed. */
SetSchedulerUpdateNeeded();
}
void KScheduler::OnThreadStateChanged(KThread *thread, KThread::ThreadState old_state) {
MESOSPHERE_ASSERT(IsSchedulerLockedByCurrentThread());