summaryrefslogtreecommitdiff
path: root/kernel/src/interrupts/interrupt_handlers.rs
blob: 46247233c05408abe5839f39d5119fc511e5d88b (plain)
1
2
3
4
5
6
7
8
9
10
11
use super::InterruptType;
use crate::io::qemu;
use x86_64::structures::idt::{InterruptStackFrame, PageFaultErrorCode};

pub extern "x86-interrupt" fn timer_handler(stack_frame: &mut InterruptStackFrame) {
    panic!("Timer interrupt recieved\n\n");

    if let Some(apic) = unsafe { super::apic::get_local_apic() } {
        apic.end_of_interrupt()
    }
}