KeAcquireGuardedMutexUnsafe function (wdm.h)

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

Syntax

void KeAcquireGuardedMutexUnsafe(
  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

Requirement Value
Minimum supported server Windows Server 2003
Header wdm.h
IRQL <= APC_LEVEL
DDI compliance rules HwStorPortProhibitedDDIs(storport), IrqlKeApcLte1(wdm)

See also

KGUARDED_MUTEX

KeReleaseGuardedMutexUnsafe