From what I can gather:
- NT's
KeAcquireSpinLock
is equivalent tospin_lock_bh
: the one raises IRQL to DISPATCH_LEVEL, the other masks the bottom half interrupts -- functionally the same. While the NT variant keeps the OldIrql, the Linux variant doesn't seem to store "wereInterruptsAlreadyMasked" anywhere. Does this meanspin_unlock_bh
always unmasks them? - NT's
KeAcquireInterruptSpinLock
is likespin_lock_irqsave
.
What is the NT equivalent of spin_lock
?
If spin_unlock_bh
always unmasks interrupts (in NT-speak, always drops IRQL to <DISPATCH_LEVEL ), does it mean spin_lock
is akin to KeAcquireSpinLockAtDpcLevel
?