Previous Next

ExInitializeFastMutex

The ExInitializeFastMutex routine initializes a fast mutex variable, used to synchronize mutually exclusive access by a set of threads to a shared resource.

VOID 
  ExInitializeFastMutex(
    IN PFAST_MUTEX  FastMutex
    );

Parameters

FastMutex
Pointer to a caller-allocated FAST_MUTEX structure, which represents the fast mutex, in the nonpaged memory pool.

Return Value

None

Headers

Declared in wdm.h and ntddk.h. Include wdm.h or ntddk.h.

Comments

ExInitializeFastMutex must be called before any calls to other Ex..FastMutex routines occur.

Although the caller supplies the storage for the given fast mutex, the FAST_MUTEX structure is opaque: that is, its members are reserved for system use.

For better performance, use the Ex..FastMutex routines instead of the Ke..Mutex routines. However, a fast mutex cannot be acquired recursively, as a kernel mutex can.

Callers of ExInitializeFastMutex must be running at IRQL <= DISPATCH_LEVEL.

See Also

ExAcquireFastMutex, ExAcquireFastMutexUnsafe, ExReleaseFastMutex, ExReleaseFastMutexUnsafe, ExTryToAcquireFastMutex, KeInitializeMutex