RtlInsertAsLeftChild 函数 (ntddk.h)

RtlInsertAsLeftChild 例程将 splay 链接节点作为指定节点的左子节点插入树中。

语法

void RtlInsertAsLeftChild(
  [in] PRTL_SPLAY_LINKS ParentLinks,
  [in] PRTL_SPLAY_LINKS ChildLinks
);

参数

[in] ParentLinks

指向树中应插入 ChildLinks 作为左子节点的指针。

[in] ChildLinks

指向要插入到树中的 splay 链接节点的指针。 节点必须已通过调用 RtlInitializeSplayLinks 进行初始化。

返回值

备注

RtlInsertAsLeftChild 的调用方必须满足以下条件:

  • ParentLinks 上的节点必须没有左子节点。

    调用方可以通过调用 RtlLeftChild 来确定节点是否已具有左子节点。 如果 RtlLeftChild 返回 NULL则 ParentLinksRtlInsertAsLeftChild 的有效参数。

  • ChildLinks 中的节点必须没有父级。

    调用方可以通过调用 RtlIsRootRtlParent 来确定此节点是否已具有父节点。 如果使用 ChildLinks 调用 RtlIsRoot 时返回 TRUE则 ChildLinksRtlInsertAsLeftChild 的有效参数。 如果 RtlParent 返回指向 ChildLinks 的等效指针, 则 ChildLinksRtlInsertAsLeftChild 的有效参数。

Rtl splay 链接例程的调用方负责同步对 splay 链接树的访问。 快速互斥体是用于此目的的最有效同步机制。

如果 splay 链接树和 ChildLinks 节点未分页,则 RtlInsertAsLeftChild 的调用方必须在 IRQL <= DISPATCH_LEVEL 运行。 通常,调用方在 IRQL PASSIVE_LEVEL运行。

要求

要求
目标平台 桌面
标头 ntddk.h (包括 Ntddk.h、Ntifs.h)
IRQL 请参见“备注”部分。

另请参阅

RtlInitializeSplayLinks

RtlInsertAsRightChild

RtlIsRoot

RtlLeftChild

RtlParent

RtlSplay