ExWaitForRundownProtectionReleaseCacheAware function (wdm.h)

The ExWaitForRundownProtectionReleaseCacheAware routine waits until all drivers that have already been granted cache-aware run-down protection complete their accesses of the shared object.

Syntax

void ExWaitForRundownProtectionReleaseCacheAware(
  [in, out] PEX_RUNDOWN_REF_CACHE_AWARE RunRef
);

Parameters

[in, out] RunRef

A pointer to a EX_RUNDOWN_REF_CACHE_AWARE structure that was initialized by a previous call to ExAllocateCacheAwareRundownProtection or ExInitializeRundownProtectionCacheAware. The cache-aware run-down protection routines use this structure to track the run-down status of the associated shared object. This structure is opaque to drivers.

Return value

None

Remarks

This routine is called by the driver that owns an object that resides in shared memory and that is accessed by other drivers. Before deleting this object, the owning driver must call this routine to wait for any outstanding accesses of the object to complete. After ExWaitForRundownProtectionReleaseCacheAware returns, the owning driver can safely delete the object.

After ExWaitForRundownProtectionReleaseCacheAware is called, the ExAcquireRundownProtectionCacheAware routine grants no further requests for cache-aware run-down protection from drivers that are trying to access the shared object.

The routine waits to return until all drivers that were previously granted cache-aware run-down protection finish accessing the object. As each driver finishes, it calls the ExReleaseRundownProtectionCacheAware routine to release the previously acquired cache-aware run-down protection. When all outstanding accesses are completed, ExWaitForRundownProtectionReleaseCacheAware returns and the object can be safely deleted.

If ExWaitForRundownProtectionReleaseCacheAware is called when all drivers that were previously granted run-down protection have already finished accessing the shared object, the routine changes the object status to run down, and returns immediately, without waiting.

If ExWaitForRundownProtectionReleaseCacheAware is called to run down a shared object, but the RunRef parameter indicates that this object is already run down, the call has no effect but is not treated as an error.

For more information, see Cache-aware run-down protection.

Requirements

Requirement Value
Minimum supported server Windows Server 2003, Service Pack 1
Header wdm.h (include Wdm.h)
DDI compliance rules HwStorPortProhibitedDDIs(storport), SpNoWait(storport)

See also

ExAcquireRundownProtectionCacheAware

ExAcquireRundownProtectionCacheAwareEx

ExAllocateCacheAwareRundownProtection

ExFreeCacheAwareRundownProtection

ExInitializeRundownProtectionCacheAware

ExReInitializeRundownProtectionCacheAware

ExReleaseRundownProtectionCacheAware

ExReleaseRundownProtectionCacheAwareEx

ExRundownCompletedCacheAware

ExSizeOfRundownProtectionCacheAware