ExTryConvertSharedSpinLockExclusive - NtDoc

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

LOGICAL ExTryConvertSharedSpinLockExclusive(
  [in, out] PEX_SPIN_LOCK SpinLock
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

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

Description

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

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.

See also

ExAcquireSpinLockShared

ExAcquireSpinLockSharedAtDpcLevel

ExReleaseSpinLockExclusive

ExReleaseSpinLockExclusiveFromDpcLevel