Skip to content

Commit ea02893

Browse files
committed
the modification of the interrupt flag should be ignored
=> using preserves_flags to announce that nothing changed
1 parent af993c3 commit ea02893

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/arch/x86_64/kernel/irq.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ const KERNEL_CODE_SELECTOR: SegmentSelector = SegmentSelector::new(1, Ring::Ring
2424

2525
/// Enable Interrupts
2626
pub fn irq_enable() {
27-
unsafe { asm!("sti", options(nomem, nostack)) };
27+
unsafe { asm!("sti", options(preserves_flags, nomem, nostack)) };
2828
}
2929

3030
/// Disable Interrupts
3131
pub fn irq_disable() {
32-
unsafe { asm!("cli", options(nomem, nostack)) };
32+
unsafe { asm!("cli", options(preserves_flags, nomem, nostack)) };
3333
}
3434

3535
/// Determines, if the interrupt flags (IF) is set

0 commit comments

Comments
 (0)