ExInitializeFastMutex function (wdm.h)

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

Syntax

void ExInitializeFastMutex(
  [out] PFAST_MUTEX FastMutex
);

Parameters

[out] FastMutex

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.

Return value

None

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.

Requirements

Requirement Value
Minimum supported client Available starting with Windows 2000.
Target Platform Desktop
Header wdm.h (include Wdm.h, Ntddk.h, Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL <= DISPATCH_LEVEL

See also

ExAcquireFastMutex

ExAcquireFastMutexUnsafe

ExReleaseFastMutex

ExReleaseFastMutexUnsafe

ExTryToAcquireFastMutex

FAST_MUTEX

KeInitializeMutex