Expand Minimize

KeReadStateMutex routine

The KeReadStateMutex routine returns the current state, signaled or not-signaled, of the specified mutex object.

Syntax


LONG KeReadStateMutex(
  _In_  PRKMUTEX Mutex
);

Parameters

Mutex [in]

Pointer to an initialized mutex object for which the caller provides the storage.

Return value

If the return value is 1, the state of the mutex object is signaled.

Remarks

This routine provides an efficient way to poll the signal state of a mutex. KeReadStateMutex reads the state of the mutex without synchronizing its access to the mutex. Do not assume that accesses of a mutex state by KeReadStateMutex are mutually exclusive of accesses by routines, such as KeReleaseMutex and KeWaitForSingleObject, that do synchronize their access to the mutex state.

For more information about mutex objects, see Mutex Objects.

Requirements

Version

Available starting with Windows 2000.

Header

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

Library

Ntoskrnl.lib

IRQL

<= DISPATCH_LEVEL

DDI compliance rules

HwStorPortProhibitedDDIs

See also

ExInitializeFastMutex
KeInitializeMutex
KeReleaseMutex
KeWaitForSingleObject

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft