RxDereferenceAndDeleteRxContext_Real - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// rxcontx.h

VOID RxDereferenceAndDeleteRxContext_Real(
  [in] IN PRX_CONTEXT RxContext
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-rxcontx-rxdereferenceanddeleterxcontext_real)

RxDereferenceAndDeleteRxContext_Real function

Description

RxDereferenceAndDeleteRxContext_Real dereferences an RX_CONTEXT data structure and if the ReferenceCount member goes to zero, then it deallocates and removes the specified RX_CONTEXT structure from the RDBSS in-memory data structures.

Parameters

RxContext [in]

A pointer to the RX_CONTEXT structure to be removed.

Remarks

RxDereferenceAndDeleteRxContext_Real is called by routines other than RxCompleteRequest during asynchronous requests that touch the RxContext parameter in either the initiating thread or in some other thread. Thus, the RX_CONTEXT data structure is reference counted and finalized on the last dereference.

If the ReferenceCount member of the RX_CONTEXT structure pointed to by the RxContext parameter is not zero after being dereferenced (decremented) by the RxDereferenceAndDeleteRxContext_Real routine, then RxDereferenceAndDeleteRxContext_Real causes the system to ASSERT on checked builds.

The RxDereferenceAndDeleteRxContext_Real routine makes a number of specific checks before removing an RX_CONTEXT. These checks include the following:

If the RX_CONTEXT structure was allocated from non-page pool memory (the Flags member of the RX_CONTEXT structure has the RX_CONTEXT_FLAG_FROM_POOL option set), then the RX_CONTEXT structure pointed to by the RxContext parameter will be returned to an internal RDBSS lookaside list or to non-paged pool memory.

See also

RX_CONTEXT

RxCompleteRequest

RxCompleteRequest_Real

RxCreateRxContext

RxDereference

RxInitializeContext

RxPrepareContextForReuse

RxResumeBlockedOperations_Serially

__RxSynchronizeBlockingOperations

__RxSynchronizeBlockingOperationsMaybeDroppingFcbLock