Expand Minimize

ExAcquireFastMutex routine

The ExAcquireFastMutex routine acquires the given fast mutex with APCs to the current thread disabled.

Syntax


VOID ExAcquireFastMutex(
  _Inout_  PFAST_MUTEX FastMutex
);

Parameters

FastMutex [in, out]

A pointer to an initialized fast mutex for which the caller provides the storage.

Return value

None

Remarks

ExAcquireFastMutex puts the caller into a wait state if the given fast mutex cannot be acquired immediately. Otherwise, the caller is given ownership of the fast mutex with APCs to the current thread disabled until it releases the fast mutex.

Use ExTryToAcquireFastMutex if the current thread can do other work before it waits on the acquisition of the given mutex.

Any fast mutex that is acquired using ExAcquireFastMutex or ExTryToAcquireFastMutex must be released with ExReleaseFastMutex.

For more information about fast mutexes, see Fast Mutexes and Guarded Mutexes.

Callers of ExAcquireFastMutex must be running at IRQL <= APC_LEVEL. ExAcquireFastMutex sets the IRQL to APC_LEVEL, and the caller continues to run at APC_LEVEL after ExAcquireFastMutex returns. ExAcquireFastMutex saves the caller's previous IRQL in the mutex, however, and that IRQL is restored when the caller invokes ExReleaseFastMutex.

Requirements

Version

Available starting with Windows 2000.

Header

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

Library

Ntoskrnl.lib

IRQL

<= APC_LEVEL (see Remarks section)

DDI compliance rules

IrqlExApcLte1, HwStorPortProhibitedDDIs

See also

FAST_MUTEX
ExAcquireFastMutexUnsafe
ExInitializeFastMutex
ExReleaseFastMutex
ExTryToAcquireFastMutex

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft