Skip to main content

Module irq_mutex

Module irq_mutex 

Source
Expand description

Interrupt-aware spinlock (IrqMutex).

Authors: MarioS271

Re-exportsยง

use core::cell::UnsafeCell; ๐Ÿ”’
use core::ops::Deref; ๐Ÿ”’
use core::ops::DerefMut; ๐Ÿ”’
use core::sync::atomic::AtomicBool; ๐Ÿ”’
use core::sync::atomic::Ordering; ๐Ÿ”’
use x86_64::registers::rflags::RFlags; ๐Ÿ”’
use crate::cpu::instructions; ๐Ÿ”’

Structsยง

IrqMutex
Spinlock for data shared between normal kernel code and interrupt handlers; disables interrupts while held to avoid self-deadlock.
IrqMutexGuard
RAII guard for IrqMutex; releases the lock and restores previous interrupts state on drop