Expand Minimize

KeAcquireSpinLockAtDpcLevel routine

The KeAcquireSpinLockAtDpcLevel routine acquires a spin lock when the caller is already running at IRQL >= DISPATCH_LEVEL.

Syntax


VOID KeAcquireSpinLockAtDpcLevel(
  _Inout_  PKSPIN_LOCK SpinLock
);

Parameters

SpinLock [in, out]

Pointer to an initialized spin lock for which the caller must provide the storage.

Return value

None

Remarks

Drivers call KeAcquireSpinLockAtDpcLevel instead of KeAcquireSpinLock for better driver performance if and only if they are already running at an IRQL of DISPATCH_LEVEL or above.

If a driver is running at IRQL <= APC_LEVEL, it should call KeAcquireSpinLock to have IRQL raised by that routine. KeAcquireSpinLockAtDpcLevel assumes the caller is already running at IRQL >= DISPATCH_LEVEL, so no raise is necessary.

The caller should release the spin lock with KeReleaseSpinLockFromDpcLevel as quickly as possible.

For more information about spin locks, see Spin Locks.

Requirements

Version

Available starting with Windows 2000.

Header

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

Library

Ntoskrnl.lib

IRQL

See Remarks section.

DDI compliance rules

HwStorPortProhibitedDDIs, IrqlDispatch, SpinLockSafe

See also

KeAcquireInStackQueuedSpinLockAtDpcLevel
KeAcquireSpinLock
KeInitializeSpinLock
KeReleaseSpinLock
KeReleaseSpinLockFromDpcLevel
KeTryToAcquireSpinLockAtDpcLevel

 

 

Send comments about this topic to Microsoft

顯示:
© 2014 Microsoft