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.
LOGICAL ExTryConvertSharedSpinLockExclusive(
[in, out] PEX_SPIN_LOCK SpinLock
);
[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.
ExTryConvertSharedSpinLockExclusive returns TRUE if the conversion succeeds; otherwise, it returns FALSE.
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.
Requirement | Value |
---|---|
Target Platform | Universal |
Header | wdm.h |
Library | Ntoskrnl.lib |
IRQL | DISPATCH_LEVEL |