The KeAcquireInStackQueuedSpinLockAtDpcLevel routine acquires a queued spin lock when the caller is already running at an IRQL = DISPATCH_LEVEL.
NTKERNELAPI
VOID
FASTCALL
KeAcquireInStackQueuedSpinLockAtDpcLevel (
IN PKSPIN_LOCK SpinLock,
IN PKLOCK_QUEUE_HANDLE LockHandle
);
None
Declared in ntddk.h. Include ntddk.h.
This routine is only available in Windows XP and later.
For a driver running at IRQL = DISPATCH_LEVEL, KeAcquireInStackQueuedSpinLockAtDpcLevel acquires a spin lock as a queued spin lock. Queued spin locks are a more efficient version of spin locks. For more information, see Queued Spin Locks. The caller releases the spin lock with KeReleaseInStackQueuedSpinLockFromDpcLevel.
Drivers that are already running at an IRQL = DISPATCH_LEVEL can call this routine to acquire the queued spin lock more quickly. Otherwise, use KeAcquireInStackQueuedSpinLock to acquire the spin lock.
Like ordinary spin locks, queued spin locks must only be used in very special circumstances. For a description of when to use spin locks, see KeAcquireSpinLock.
Drivers must not combine calls to KeAcquireSpinLock and KeAcquireInStackQueuedSpinLock on the same spin lock. A spin lock must always be acquired or released as either a queued spin lock, or as an ordinary spin lock.
KeAcquireSpinLock, KeAcquireInStackQueuedSpinLock, KeInitializeSpinLock, KeReleaseInStackQueuedSpinLockFromDpcLevel