KeInitializeMutex function

The KeInitializeMutex routine initializes a mutex object, setting it to a signaled state.

Syntax

NTKERNELAPI VOID KeInitializeMutex(
  PRKMUTEX Mutex,
  ULONG    Level
);

Parameters

Mutex

Pointer to a mutex object, for which the caller provides the storage. The storage must be 4-byte aligned on 32-bit platforms, and 8-byte aligned on 64-bit platforms.

Level

Reserved. Drivers set this to zero.

Return Value

None

Remarks

For better performance, use fast mutexes or guarded mutexes. For more information, see Alternatives to Mutex Objects.

The mutex object is initialized with an initial state of signaled.

Storage for a mutex object must be resident: in the device extension of a driver-created device object, in the controller extension of a driver-created controller object, or in nonpaged pool allocated by the caller.

For more information about mutex objects, see Mutex Objects.

Requirements

   
Windows version Available starting with Windows 2000.
Target Platform Universal
Header wdm.h (include Wdm.h, Ntddk.h, Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL Any level
DDI compliance rules HwStorPortProhibitedDDIs

See Also

ExInitializeFastMutex

KeReadStateMutex

KeReleaseMutex

KeWaitForMultipleObjects

KeWaitForMutexObject

KeWaitForSingleObject