Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

ExReleaseFastMutex routine

The ExReleaseFastMutex routine releases ownership of a fast mutex that was acquired with ExAcquireFastMutex or ExTryToAcquireFastMutex.

Syntax


VOID ExReleaseFastMutex(
  _Inout_  PFAST_MUTEX FastMutex
);

Parameters

FastMutex [in, out]

A pointer to the fast mutex to be released.

Return value

None

Remarks

ExReleaseFastMutex releases ownership of the given fast mutex and sets the IRQL to the value that the caller was running at before it called ExAcquireFastMutex. If the previous IRQL was less than APC_LEVEL, the delivery of APCs to the current thread is reenabled.

It is a programming error to call ExReleaseFastMutex with a FastMutex that was acquired using ExAcquireFastMutexUnsafe. Drivers should release a fast mutex from the same thread that acquired it. Fast mutexes should be released in the opposite order from the order they were acquired.

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

Callers of ExReleaseFastMutex must be running at IRQL = APC_LEVEL. In most cases the IRQL will already be set to APC_LEVEL before ExReleaseFastMutex is called because ExAcquireFastMutex has already set the IRQL to APC_LEVEL automatically. However, if the caller changes the IRQL after ExAcquireFastMutex returns, the caller must explicitly set the IRQL to APC_LEVEL prior to calling ExReleaseFastMutex.

Requirements

Version

Available starting with Windows 2000.

Header

Wdm.h (include Wdm.h, Ntddk.h, or Ntifs.h)

Library

Ntoskrnl.lib

IRQL

APC_LEVEL (see Remarks section)

DDI compliance rules

HwStorPortProhibitedDDIs

See also

FAST_MUTEX
ExAcquireFastMutex
ExInitializeFastMutex
ExTryToAcquireFastMutex

 

 

Send comments about this topic to Microsoft

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.