// wdm.h
BOOLEAN KeTryToAcquireSpinLockAtDpcLevel(
[in, out] PKSPIN_LOCK SpinLock
);
View the official Windows Driver Kit DDI reference
No description available.
The KeTryToAcquireSpinLockAtDpcLevel routine attempts to acquire a spin lock at DISPATCH_LEVEL.
SpinLock
[in, out]Specifies the spin lock to acquire. The spin lock must have already been initialized by KeInitializeSpinLock.
KeTryToAcquireSpinLockAtDpcLevel returns TRUE if the spin lock has been acquired, and FALSE if the spin lock is already being held and cannot be acquired.
If the specified spin lock is not busy, the KeTryToAcquireSpinLockAtDpcLevel routine acquires the spin lock (see KeAcquireSpinLock for details) and returns TRUE. If the spin lock has already been acquired, the routine immediately returns FALSE.
If the spin lock is acquired, the caller can release it by using the KeReleaseSpinLock routine.
If you want the driver to block when it is unable to acquire the spin lock, use KeAcquireSpinLockAtDpcLevel instead.
For more information about spin locks, see Spin Locks.