Skip to content
Snippets Groups Projects
Commit 3dc34b43 authored by Martin Kröning's avatar Martin Kröning :crab:
Browse files

irq::nested_disable: Only disable if necessary

parent b4e94471
Branches
Tags
No related merge requests found
......@@ -92,9 +92,11 @@ pub fn disable() {
#[inline]
pub fn nested_disable() -> bool {
cfg!(target_os = "none") && {
let ret = rflags::read().contains(RFlags::FLAGS_IF);
disable();
ret
let enabled = rflags::read().contains(RFlags::FLAGS_IF);
if enabled {
disable();
}
enabled
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment