The ExAcquireFastMutex routine acquires the given fast mutex with APCs to the current thread disabled.
VOID
ExAcquireFastMutex(
IN PFAST_MUTEX FastMutex
);
None
Declared in wdm.h and ntddk.h. Include wdm.h or ntddk.h.
ExAcquireFastMutex puts the caller into a wait state if the given fast mutex cannot be acquired immediately. Otherwise, the caller is given ownership of the fast mutex with APCs to the current thread disabled until it releases the fast mutex.
Use ExTryToAcquireFastMutex if the current thread can do other work before it waits on the acquisition of the given mutex.
Any fast mutex that is acquired using ExAcquireFastMutex or ExTryToAcquireFastMutex must be released with ExReleaseFastMutex.
Callers of ExAcquireFastMutex must be running at IRQL < DISPATCH_LEVEL. ExAcquireFastMutex sets the IRQL to APC_LEVEL, and the caller continues to run at APC_LEVEL after ExAcquireFastMutex returns. ExAcquireFastMutex saves the caller's previous IRQL in the mutex, however, and that IRQL is restored when the caller invokes ExReleaseFastMutex.
ExAcquireFastMutexUnsafe, ExInitializeFastMutex, ExReleaseFastMutex, ExTryToAcquireFastMutex