1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 13:57:35 +00:00

Kernel: Add Processor::wait_for_interrupt and use it in Scheduler

This removes the x86 specific hlt instruction from the scheduler, and
allows us to run the scheduler code for aarch64 by implementing
Processor::wait_for_interrupt for aarch64.
This commit is contained in:
Timon Kruiper 2022-12-22 13:24:19 +01:00 committed by Andrew Kaster
parent f232133f65
commit f6f43fd65e
3 changed files with 13 additions and 4 deletions

View file

@ -150,6 +150,11 @@ public:
s_idle_cpu_mask.fetch_and(~(1u << m_cpu), AK::MemoryOrder::memory_order_relaxed);
}
void wait_for_interrupt() const
{
asm("hlt");
}
static Processor& by_id(u32);
static u32 count()