Files
RedBear-OS/src/arch/x86_shared/interrupt/ipi.rs
T
Red Bear OS 82feefbaee Red Bear OS kernel baseline
From release 0.1.0 pre-patched archive.
This includes all Red Bear modifications previously maintained
as patches in local/patches/kernel/.
2026-06-27 09:19:25 +03:00

29 lines
699 B
Rust

use crate::{
arch::device::local_apic::the_local_apic, context, percpu::PercpuBlock, sync::CleanLockToken,
};
interrupt!(wakeup, || {
unsafe { the_local_apic().eoi() };
});
interrupt!(tlb, || {
PercpuBlock::current().maybe_handle_tlb_shootdown();
unsafe { the_local_apic().eoi() };
});
interrupt!(switch, || {
unsafe { the_local_apic().eoi() };
let mut token = unsafe { CleanLockToken::new() };
let _ = context::switch(&mut token);
});
interrupt!(pit, || {
unsafe { the_local_apic().eoi() };
// Switch after a sufficient amount of time since the last switch.
let mut token = unsafe { CleanLockToken::new() };
context::switch::tick(&mut token);
});