RxDereference function (rxprocs.h)

RxDereference decrements the NodeReferenceCount member of a structure by one for several reference counted data structures used by RDBSS.

Syntax

void RxDereference(
  [in, out] IN OUT PVOID          Instance,
  [in]      IN LOCK_HOLDING_STATE LockHoldingState
);

Parameters

[in, out] Instance

A pointer to the reference-counted data structure to be dereferenced.

[in] LockHoldingState

The mode in which the appropriate lock for this data structure is held. This parameter can be one of the following values for the LOCK_HOLDING_STATE enumeration:

LHS_LockNotHeld

A lock is not currently held.

LHS_SharedLockHeld

A shared lock is being held.

LHS_ExclusiveLockHeld

An exclusive lock is being held.

Return value

None

Remarks

RxDereference can be used to dereference (decrement by one) the NodeReferenceCount member on the following data structures used by RDBSS:

SRV_CALL

NET_ROOT

V_NET_ROOT

SRV_OPEN

FOBX

If RxDereference is called with any other type of RDBSS data structure, the routine causes the system to ASSERT on checked builds.

If the NodeReferenceCount member is less than 0 after being dereferenced (decremented) by RxDereference, then RxDereference causes the system to ASSERT on checked builds.

If the NodeReferenceCount member decrements to 1 and the LockHoldingState parameter was LHS_ExclusiveLockHeld, the instance of the data structure can be finalized immediately. Otherwise, the instance of the data structure is tagged to be scavenged and finalized later.

Requirements

Requirement Value
Target Platform Desktop
Header rxprocs.h (include Rxprocs.h)
IRQL <= APC_LEVEL

See also

RxReference

The FOBX Structure

The NET_ROOT Structure

The SRV_CALL Structure

The SRV_OPEN Structure

The V_NET_ROOT Structure