The KeAcquireInStackQueuedSpinLock routine acquires a queued spin lock.
VOID
FASTCALL
KeAcquireInStackQueuedSpinLock (
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.
KeAcquireInStackQueuedSpinLock 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 KeReleaseInStackQueuedSpinLock.
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.
This routine raises the IRQL level to DISPATCH_LEVEL when acquiring the spin lock. If the caller is guaranteed to already be running at DISPATCH_LEVEL, it is more efficient to call KeAcquireInStackQueuedSpinLockAtDpcLevel.
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, KeAcquireInStackQueuedSpinLockAtDpcLevel, KeInitializeSpinLock, KeReleaseInStackQueuedSpinLock