KeAcquireInStackQueuedSpinLockForDpc function (wdm.h)

The KeAcquireInStackQueuedSpinLockForDpc routine acquires a queued spin lock for a threaded DPC.

Syntax

void KeAcquireInStackQueuedSpinLockForDpc(
  PKSPIN_LOCK         SpinLock,
  PKLOCK_QUEUE_HANDLE LockHandle
);

Parameters

SpinLock

[in, out] Pointer to the spin lock to acquire as a queued spin lock. You must have already initialized the spin lock by calling KeInitializeSpinLock.

LockHandle

[out] Pointer to a KLOCK_QUEUE_HANDLE structure that receives the lock queue handle. Pass this value to the KeReleaseInStackQueuedSpinLockForDpc routine when you release the queued spin lock.

Return value

None

Remarks

A CustomThreadedDpc routine can use KeAcquireInStackQueuedSpinLockForDpc to acquire a queued spin lock. If CustomThreadedDpc is executing at IRQL = PASSIVE_LEVEL, KeAcquireInStackQueuedSpinLockForDpc raises the current IRQL to DISPATCH_LEVEL. If CustomThreadedDpc is already executing at IRQL = DISPATCH_LEVEL, KeAcquireInStackQueuedSpinLockForDpc does not change the current IRQL.

For more information about queued spin locks, see Queued Spin Locks.

Call KeReleaseInStackQueuedSpinLockForDpc to release the spin lock that KeAcquireInStackQueuedSpinLockForDpc acquired.

Requirements

Requirement Value
Minimum supported client Windows Vista
Header wdm.h
DDI compliance rules HwStorPortProhibitedDDIs(storport)

See also

CustomThreadedDpc

KLOCK_QUEUE_HANDLE

KeInitializeSpinLock

KeReleaseInStackQueuedSpinLockForDpc