diff options
Diffstat (limited to 'kernel/src/interrupts/interrupt_handlers.rs')
-rw-r--r-- | kernel/src/interrupts/interrupt_handlers.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/src/interrupts/interrupt_handlers.rs b/kernel/src/interrupts/interrupt_handlers.rs index f05e2dc..4624723 100644 --- a/kernel/src/interrupts/interrupt_handlers.rs +++ b/kernel/src/interrupts/interrupt_handlers.rs @@ -5,5 +5,7 @@ use x86_64::structures::idt::{InterruptStackFrame, PageFaultErrorCode}; pub extern "x86-interrupt" fn timer_handler(stack_frame: &mut InterruptStackFrame) { panic!("Timer interrupt recieved\n\n"); - super::apic::get_local_apic().map(|apic| apic.end_of_interrupt()) + if let Some(apic) = unsafe { super::apic::get_local_apic() } { + apic.end_of_interrupt() + } } |