ExTryConvertSharedSpinLockExclusive function (wdm.h)

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

Syntax

LOGICAL ExTryConvertSharedSpinLockExclusive(
  [in, out] PEX_SPIN_LOCK SpinLock
);

Parameters

[in, out] SpinLock

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

Requirement Value
Target Platform Universal
Header wdm.h
Library Ntoskrnl.lib
IRQL DISPATCH_LEVEL

See also

ExAcquireSpinLockShared

ExAcquireSpinLockSharedAtDpcLevel

ExReleaseSpinLockExclusive

ExReleaseSpinLockExclusiveFromDpcLevel