kern: fix kscheduler interrupt api, adjust debug logging

This commit is contained in:
Michael Scire 2020-07-17 22:10:50 -07:00 committed by SciresM
parent fae2daf77c
commit 5fa59ec888
6 changed files with 18 additions and 8 deletions

View file

@ -70,6 +70,11 @@ namespace ams::kern {
NOINLINE void Initialize(KThread *idle_thread);
NOINLINE void Activate();
ALWAYS_INLINE void SetInterruptTaskRunnable() {
this->state.interrupt_task_thread_runnable = true;
this->state.needs_scheduling = true;
}
ALWAYS_INLINE void RequestScheduleOnInterrupt() {
SetSchedulerUpdateNeeded();
@ -85,13 +90,13 @@ namespace ams::kern {
static ALWAYS_INLINE KSchedulerPriorityQueue &GetPriorityQueue() { return s_priority_queue; }
static NOINLINE u64 UpdateHighestPriorityThreadsImpl();
static NOINLINE void InterruptTaskThreadToRunnable();
public:
/* Static public API. */
static ALWAYS_INLINE bool CanSchedule() { return GetCurrentThread().GetDisableDispatchCount() == 0; }
static ALWAYS_INLINE bool IsSchedulerLockedByCurrentThread() { return s_scheduler_lock.IsLockedByCurrentThread(); }
static NOINLINE void SetInterruptTaskThreadRunnable();
static ALWAYS_INLINE void DisableScheduling() {
MESOSPHERE_ASSERT(GetCurrentThread().GetDisableDispatchCount() >= 0);
GetCurrentThread().DisableDispatch();