VOID
KeAcquireSpinLockAtDpcLevel(
IN PKSPIN_LOCK SpinLock
);
KeAcquireSpinLockAtDpcLevel acquires a spin lock when the caller is already running at IRQL DISPATCH_LEVEL.
Drivers call KeAcquireSpinLockAtDpcLevel instead of KeAcquireSpinLock for better driver performance if and only if they are already running at IRQL DISPATCH_LEVEL.
If a driver is running at IRQL < DISPATCH_LEVEL, it should call KeAcquireSpinLock to have IRQL raised by that routine. KeAcquireSpinLockAtDpcLevel assumes the caller is already running at IRQL DISPATCH_LEVEL, so no raise is necessary.
The caller should release the spin lock with KeReleaseSpinLockFromDpcLevel as quickly as possible.
KeAcquireSpinLock, KeInitializeSpinLock, KeReleaseSpinLock, KeReleaseSpinLockFromDpcLevel