Previous Next

ExTryToAcquireFastMutex

The ExTryToAcquireFastMutex routine acquires the given fast mutex, if possible, with APCs to the current thread disabled.

BOOLEAN 
  ExTryToAcquireFastMutex(
    IN PFAST_MUTEX  FastMutex
    );

Parameters

FastMutex
Pointer to the fast mutex to be acquired if it is not currently owned by another thread.

Return Value

ExTryToAcquireFastMutex returns TRUE if the current thread is given ownership of the fast mutex.

Headers

Declared in ntddk.h. Include ntddk.h.

Comments

If the given fast mutex is currently unowned, ExTryToAcquireFastMutex gives the caller ownership with APCs to the current thread disabled until it releases the fast mutex.

Use ExAcquireFastMutex if the current thread must wait on the acquisition of the given mutex before it can do useful work.

Any fast mutex that is acquired with ExTryToAcquireFastMutex or ExAcquireFastMutex must be released with ExReleaseFastMutex.

Callers of ExTryToAcquireFastMutex must be running at IRQL < DISPATCH_LEVEL.

See Also

ExAcquireFastMutex, ExInitializeFastMutex, ExReleaseFastMutex