KeAcquireGuardedMutex - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// wdm.h

VOID KeAcquireGuardedMutex(
  PKGUARDED_MUTEX Mutex
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-wdm-keacquireguardedmutex)

Description

The KeAcquireGuardedMutex routine acquires a guarded mutex.

Parameters

Mutex

[in, out] Pointer to the KGUARDED_MUTEX structure for the guarded mutex. This structure must have been initialized with KeInitializeGuardedMutex.

Remarks

Use KeReleaseGuardedMutex to release a mutex acquired with KeAcquireGuardedMutex.

If the mutex is available, KeAcquireGuardedMutex returns immediately. Otherwise, the calling thread is put in a wait state until the mutex becomes available. To avoid entering a wait state when the mutex is unavailable, use KeTryToAcquireGuardedMutex.

A thread that calls KeAcquireGuardedMutex implicitly enters a guarded region, where all APCs are disabled. They remain disabled until the thread releases the mutex with KeReleaseGuardedMutex.

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

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

See also

KGUARDED_MUTEX

KeReleaseGuardedMutex