summaryrefslogtreecommitdiff
path: root/kernel/src/interrupts/interrupt_handlers.rs
diff options
context:
space:
mode:
authornatrixaeria <upezu@student.kit.edu>2019-11-15 21:53:15 +0100
committernatrixaeria <upezu@student.kit.edu>2019-11-15 21:53:15 +0100
commitbd2e2835d5507f6df908640a151aa1093206f075 (patch)
tree6cac9499eb87ea59bbbb2f15c4434c1905bb184d /kernel/src/interrupts/interrupt_handlers.rs
parent5e849967177a2ea639e783e847974db00cce2fff (diff)
Repare broken code
Diffstat (limited to 'kernel/src/interrupts/interrupt_handlers.rs')
-rw-r--r--kernel/src/interrupts/interrupt_handlers.rs4
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()
+ }
}