diff --git a/ableos/src/arch/x86_64/interrupts.rs b/ableos/src/arch/x86_64/interrupts.rs index 54459cd6..8813509e 100644 --- a/ableos/src/arch/x86_64/interrupts.rs +++ b/ableos/src/arch/x86_64/interrupts.rs @@ -89,6 +89,15 @@ extern "x86-interrupt" fn double_fault_handler( // panic!("EXCEPTION: DOUBLE FAULT\n{:#?}", stack_frame); } +/* SAFETY +* DO NOT TOUCH +* The `#[naked]` macro removes various error/bounds checks that +* the Rust compiler would normally add. +* *Early return* and *enabling interrupts* in this function are +* undefined behavior. +* As long as nothing in this function does something that would +* normally trigger an error, this function is relatively safe. +*/ #[naked] extern "x86-interrupt" fn timer_interrupt_handler(_stack_frame: InterruptStackFrame) { use super::task_switcher;