diff --git a/Kernel/Arch/aarch64/Processor.cpp b/Kernel/Arch/aarch64/Processor.cpp index 23a0cf6f087..46397173174 100644 --- a/Kernel/Arch/aarch64/Processor.cpp +++ b/Kernel/Arch/aarch64/Processor.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -171,7 +172,14 @@ ErrorOr> Processor::capture_stack_trace(Thread& thread, size void Processor::check_invoke_scheduler() { - TODO_AARCH64(); + VERIFY_INTERRUPTS_DISABLED(); + VERIFY(!m_in_irq); + VERIFY(!m_in_critical); + VERIFY(&Processor::current() == this); + if (m_invoke_scheduler_async && m_scheduler_initialized) { + m_invoke_scheduler_async = false; + Scheduler::invoke_async(); + } } } diff --git a/Kernel/Arch/aarch64/Processor.h b/Kernel/Arch/aarch64/Processor.h index 1603196ccf5..26940b1d6e3 100644 --- a/Kernel/Arch/aarch64/Processor.h +++ b/Kernel/Arch/aarch64/Processor.h @@ -279,6 +279,7 @@ private: FlatPtr m_in_irq { 0 }; bool m_in_scheduler { false }; bool m_invoke_scheduler_async { false }; + bool m_scheduler_initialized { false }; }; }