ExTryToAcquireFastMutex

BOOLEAN
    ExTryToAcquireFastMutex(

        IN PFAST_MUTEX  FastMutex
        );

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

Parameters

FastMutex
Points 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.

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 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