函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:include\linux\rbtree_latch.h Create Date:2022-07-27 06:49:17
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:__lt_insert

函数原型:static __always_inline void __lt_insert(struct latch_tree_node *ltn, struct latch_tree_root *ltr, int idx, bool (*less)(struct latch_tree_node *a, struct latch_tree_node *b))

返回类型:void

参数:

类型参数名称
struct latch_tree_node *ltn
struct latch_tree_root *ltr
intidx
bool (*less
79  root等于tree[idx]
80  link等于rb_node
81  node等于node[idx]
82  struct rb_node * parent = NULL
85 link循环
86  parent等于link
87  ltp等于__lt_from_rb(parent, idx)
89  如果less(ltn, ltp)则link等于rb_left
91  否则link等于rb_right
95  rb_link_node_rcu(node, parent, link)
96  rb_insert_color(node, root)
调用者
名称描述
latch_tree_insertlatch_tree_insert() - insert @node into the trees @root*@node: nodes to insert*@root: trees to insert @node into*@ops: operators defining the node order* It inserts @node into @root in an ordered fashion such that we can always* observe one complete tree