ExAcquireFastMutexUnsafe - NtDoc

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

VOID ExAcquireFastMutexUnsafe(
  PFAST_MUTEX FastMutex
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

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

Description

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

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

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

See also

ExAcquireFastMutex

ExInitializeFastMutex

ExReleaseFastMutexUnsafe

ExTryToAcquireFastMutex

FAST_MUTEX

FsRtlEnterFileSystem

KeEnterCriticalRegion

KeLeaveCriticalRegion