KeAcquireSpinLockForDpc routine

The KeAcquireSpinLockForDpc routine acquires a threaded DPC spin lock.

Syntax


KIRQL KeAcquireSpinLockForDpc(
  _Inout_ 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

Target platform

Universal

Version

Available in Windows Vista and later versions of Windows.

Header

Wdm.h (include Wdm.h, Ntddk.h, or Ntifs.h)

Library

NtosKrnl.lib

DLL

NtosKrnl.exe

IRQL

See Remarks section.

DDI compliance rules

HwStorPortProhibitedDDIs

See also

CustomThreadedDpc
KeInitializeSpinLock
KeReleaseSpinLockForDpc

 

 

Send comments about this topic to Microsoft

Show: