// wdm.h
BOOLEAN KeTryToAcquireGuardedMutex(
[in, out] PKGUARDED_MUTEX Mutex
);
View the official Windows Driver Kit DDI referenceNo description available.
The KeTryToAcquireGuardedMutex routine acquires a guarded mutex, if available.
Mutex [in, out]Pointer to the KGUARDED_MUTEX structure for the guarded mutex.
KeTryToAcquireGuardedMutex returns TRUE if the mutex is acquired, and FALSE otherwise.
Use KeReleaseGuardedMutex to release the mutex.
KeTryToAcquireGuardedMutex returns immediately, regardless of whether it can acquire the mutex. Use KeAcquireGuardedMutex to put the calling thread into a wait state until mutex becomes available.
A thread that calls KeTryToAcquireGuardedMutex implicitly enters a guarded region, where all APCs are disabled. They remain disabled until the thread releases the mutex with KeReleaseGuardedMutex.
For more information about guarded mutexes, see Fast Mutexes and Guarded Mutexes.