KeAcquireSpinLockForDpc - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// wdm.h

KIRQL KeAcquireSpinLockForDpc(
  PKSPIN_LOCK SpinLock
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-wdm-keacquirespinlockfordpc)

Description

The KeAcquireSpinLockForDpc routine acquires a threaded DPC spin lock.

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.

See also

CustomThreadedDpc

KeInitializeSpinLock

KeReleaseSpinLockForDpc