KeAcquireSpinLockForDpc function (wdm.h)
The KeAcquireSpinLockForDpc routine acquires a threaded DPC spin lock.
Syntax
KIRQL KeAcquireSpinLockForDpc(
PKSPIN_LOCK SpinLock
);
Parameters
SpinLock
[in, out] Pointer to the spin lock to acquire. You must have already initialized the spin lock by calling KeInitializeSpinLock.
Return value
KeAcquireSpinLockForDpc returns the current IRQL at the time the routine is called. Pass this value to KeReleaseSpinLockForDpc when you release the spin lock.
Remarks
A CustomThreadedDpc routine can call KeAcquireSpinLockForDpc to acquire a spin lock. If CustomThreadedDpc is executing at IRQL = PASSIVE_LEVEL, KeAcquireSpinLockForDpc raises the current IRQL to DISPATCH_LEVEL. If CustomThreadedDpc is already executing at IRQL = DISPATCH_LEVEL, KeAcquireSpinLockForDpc does not change the current IRQL.
Call KeReleaseSpinLockForDpc to release a spin lock acquired by KeAcquireSpinLockForDpc. Pass the return value from KeAcquireSpinLockForDpc to KeReleaseSpinLockForDpc.
For more information about spin locks, see Spin Locks.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista |
Header | wdm.h |
DDI compliance rules | HwStorPortProhibitedDDIs(storport) |