ExAcquireFastMutexUnsafe function (wdm.h)

The ExAcquireFastMutexUnsafe routine acquires the specified fast mutex for the calling thread.

Syntax

void ExAcquireFastMutexUnsafe(
  PFAST_MUTEX FastMutex
);

Parameters

FastMutex

[in, out] A pointer to a FAST_MUTEX) structure that the caller provides the storage for. The caller previously initialized this structure by a call to the ExInitializeFastMutex routine

Return value

None

Remarks

ExAcquireFastMutexUnsafe puts the caller into a wait state if the specified fast mutex cannot be acquired immediately. Otherwise, the caller is given ownership of the mutex and exclusive access to the resource that the mutex protects until the caller releases the mutex.

Any fast mutex that is acquired by a call to ExAcquireFastMutexUnsafe must be released by a call to the ExReleaseFastMutexUnsafe routine.

The ExAcquireFastMutex and ExAcquireFastMutexUnsafe routines cause the calling thread to block until the mutex is available. The ExTryToAcquireFastMutex routine returns immediately with return value FALSE if another thread has already acquired the mutex. Both ExAcquireFastMutex and ExTryToAcquireFastMutex raise the IRQL to APC_LEVEL before acquiring the fast mutex. Drivers should use ExAcquireFastMutexUnsafe, which does not raise the IRQL, only if either of the following is true:

For more information about fast mutexes, see the following topics:

Fast Mutexes and Guarded Mutexes

Locks, Deadlocks, and Synchronization

Requirements

Requirement Value
Minimum supported client Windows 2000
Header wdm.h
IRQL APC_LEVEL
DDI compliance rules HwStorPortProhibitedDDIs(storport)

See also

ExAcquireFastMutex

ExInitializeFastMutex

ExReleaseFastMutexUnsafe

ExTryToAcquireFastMutex

FAST_MUTEX

FsRtlEnterFileSystem

KeEnterCriticalRegion

KeLeaveCriticalRegion