函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\rbtree_test.c Create Date:2022-07-27 08:20:02
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:insert_augmented

函数原型:static void insert_augmented(struct test_node *node, struct rb_root_cached *root)

返回类型:void

参数:

类型参数名称
struct test_node *node
struct rb_root_cached *root
88  struct rb_node * * new = & rb_node, * rb_parent = NULL
89  key等于key
90  val等于 following fields used for testing augmented rbtree functionality
93 new循环
94  rb_parent等于new
95  parent等于rb_entry(rb_parent, structtest_node, rb)
96  如果augmented小于valaugmented等于val
98  如果key小于keynew等于rb_left
100  否则new等于rb_right
104  augmented等于val
105  rb_link_node( & rb, rb_parent, new)
106  Fixup the rbtree and update the augmented information when rebalancing.* On insertion, the user must update the augmented information on the path* leading to the inserted node, then call rb_link_node() as usual and
调用者
名称描述
rbtree_test_init