Expand Minimize

ExTryConvertSharedSpinLockExclusive routine

The ExTryConvertSharedSpinLockExclusive routine attempts to convert the access state of a spin lock from acquired for shared access to exclusive access.

Syntax


BOOLEAN ExTryConvertSharedSpinLockExclusive(
  _Inout_ PEX_SPIN_LOCK  SpinLock
);

Parameters

SpinLock [in, out]

A pointer to the spin lock whose access state is to be converted to exclusive access. The caller must already own this spin lock for shared access.

Return value

ExTryConvertSharedSpinLockExclusive returns TRUE if the conversion succeeds; otherwise, it returns FALSE.

Remarks

If the caller acquired the shared spin lock by calling the ExAcquireSpinLockSharedAtDpcLevel routine, the caller should release the converted spin lock by calling the ExReleaseSpinLockExclusiveFromDpcLevel routine. If the caller acquired the shared spin lock by calling the ExAcquireSpinLockShared routine, the caller should release the converted spin lock by calling the ExReleaseSpinLockExclusive routine, and the OldIrql value supplied as an input parameter to this routine should be the KIRQL value returned by ExAcquireSpinLockShared.

Requirements

Target platform

Universal

Version

Available starting with Windows Vista with SP1.

Header

Wdm.h

IRQL

DISPATCH_LEVEL

See also

ExAcquireSpinLockShared
ExAcquireSpinLockSharedAtDpcLevel
ExReleaseSpinLockExclusive
ExReleaseSpinLockExclusiveFromDpcLevel

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft