Skip to main content

KernelRawMutex

Type Alias KernelRawMutex 

Source
pub type KernelRawMutex = RawIrqSaveMutex;
Expand description

Raw mutex used as the L type parameter for the kprobe crate’s ProbeManager / Kprobe / Kretprobe (the perf subsystem refers to the concrete probe types parameterized on it — see KernelKprobe / KernelKretprobe).

Backed by [crate::sync::RawSpinNoIrq], which disables kernel preemption and local IRQs across the critical section (IRQ-save semantics, the same as the rest of the kernel’s spin locks). This matters because the lock is taken on trap / kprobe-callback paths: a plain atomic spin lock that left preemption and IRQs enabled could be re-entered on the same CPU and would then deadlock spinning on a lock it already holds.

Aliased Type§

pub struct KernelRawMutex(/* private fields */);