RtlInsertAsRightChild - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTRTL_H

#define RtlInsertAsRightChild(ParentLinks, ChildLinks) \
{ \
    PRTL_SPLAY_LINKS _SplayParent; \
    PRTL_SPLAY_LINKS _SplayChild; \
    _SplayParent = (PRTL_SPLAY_LINKS)(ParentLinks); \
    _SplayChild = (PRTL_SPLAY_LINKS)(ChildLinks); \
    _SplayParent->RightChild = _SplayChild; \
    _SplayChild->Parent = _SplayParent; \
}

#endif

View code on GitHub
// ntddk.h

VOID RtlInsertAsRightChild(
  [in] PRTL_SPLAY_LINKS ParentLinks,
  [in] PRTL_SPLAY_LINKS ChildLinks
);
View the official Windows Driver Kit DDI reference

NtDoc

This function is documented in Windows Driver Kit.

Windows Driver Kit DDI reference (nf-ntddk-rtlinsertasrightchild)

RtlInsertAsRightChild function

Description

The RtlInsertAsRightChild routine inserts a given splay link into the tree as the right child of a given node in that tree.

Parameters

Pointer to the node in the tree at which ChildLinks should be inserted as the right child.

Pointer to the splay link node to be inserted into the tree. The node must have been initialized by calling RtlInitializeSplayLinks.

Remarks

Callers of RtlInsertAsRightChild are responsible for meeting the following criteria:

Callers of the Rtl splay link routines are responsible for synchronizing access to the splay link tree. A fast mutex is the most efficient synchronization mechanism to use for this purpose.

Callers of RtlInsertAsRightChild must be running at IRQL <= DISPATCH_LEVEL if the splay link tree and ChildLinks node are nonpaged. Usually, callers are running at IRQL PASSIVE_LEVEL.

See also

RtlInitializeSplayLinks

RtlInsertAsLeftChild

RtlIsRoot

RtlParent

RtlRightChild

RtlSplay