Expand Minimize

KeAcquireGuardedMutexUnsafe function

The KeAcquireGuardedMutexUnsafe acquires a guarded mutex while inside a guarded region.

Syntax


VOID KeAcquireGuardedMutexUnsafe(
  _Inout_  PKGUARDED_MUTEX FastMutex
);

Parameters

FastMutex [in, out]

Pointer to the KGUARDED_MUTEX structure for the guarded mutex.

Return value

None

Remarks

Use KeReleaseGuardedMutexUnsafe to release a guarded mutex acquired with KeAcquireMutexUnsafe.

KeAcquireGuardedMutexUnsafe does not implicitly place the calling thread within a guarded region. Code enclosed within a KeAcquireGuardedMutexUnsafe/KeReleaseGuardedMutexUnsafe pair must execute either at IRQL = APC_LEVEL, or within a guarded region. For code that is not guaranteed to execute within a guarded region, use KeAcquireGuardedMutex and KeReleaseGuardedMutexUnsafe.

A guarded mutex cannot be acquired recursively: if a thread is already holding the mutex when it calls KeAcquireGuardedMutexUnsafe, the thread will deadlock.

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

Requirements

Version

Available in Windows Server 2003 and later versions of Windows.

Header

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

Library

Ntoskrnl.lib

IRQL

<= APC_LEVEL

DDI compliance rules

IrqlKeApcLte1, HwStorPortProhibitedDDIs

See also

KGUARDED_MUTEX
KeReleaseGuardedMutexUnsafe

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft