ExInitializeFastMutex - NtDoc

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

VOID ExInitializeFastMutex(
  [out] PFAST_MUTEX FastMutex
);

View the official Windows Driver Kit DDI reference

NtDoc

No description available.

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

ExInitializeFastMutex function

Description

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

Parameters

FastMutex [out]

A pointer to a caller-allocated FAST_MUTEX structure, which represents the fast mutex, in the nonpaged memory pool. The allocation must be 4-byte aligned on 32-bit platforms, and 8-byte aligned on 64-bit platforms.

Remarks

ExInitializeFastMutex must be called before any calls to other ExXxxFastMutex 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 ExXxxFastMutex routines instead of the KeXxxMutex routines. However, a fast mutex cannot be acquired recursively, as a kernel mutex can.

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

See also

ExAcquireFastMutex

ExAcquireFastMutexUnsafe

ExReleaseFastMutex

ExReleaseFastMutexUnsafe

ExTryToAcquireFastMutex

FAST_MUTEX

KeInitializeMutex