Skip to main content

save_flags_and_cli

Function save_flags_and_cli 

Source
pub fn save_flags_and_cli() -> u64
Expand description

Save RFLAGS and disable interrupts. Returns saved flags.

Used to protect critical sections (e.g., scheduler lock) from being interrupted by the timer, which would cause deadlock on single-core systems.