Export (0) Print
Expand All
Expand Minimize

ExAcquireFastMutexUnsafe routine

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

Syntax


VOID ExAcquireFastMutexUnsafe(
  _Inout_  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

Version

Available starting with Windows 2000.

Header

Wdm.h (include Wdm.h, Ntddk.h, or Ntifs.h)

Library

Ntoskrnl.lib

IRQL

APC_LEVEL

DDI compliance rules

HwStorPortProhibitedDDIs

See also

ExAcquireFastMutex
ExInitializeFastMutex
ExReleaseFastMutexUnsafe
ExTryToAcquireFastMutex
FAST_MUTEX
FsRtlEnterFileSystem
KeEnterCriticalRegion
KeLeaveCriticalRegion

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft