Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:include\linux\rbtree_latch.h Create Date:2022-07-28 05:48:54
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__lt_insert

Proto: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))

Type:void

Parameter:

TypeParameterName
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  When link cycle
86  parent = link
87  ltp = __lt_from_rb(parent, idx)
89  If less(ltn, ltp) Then link = rb_left
91  Else link = rb_right
95  rb_link_node_rcu(node, parent, link)
96  rb_insert_color(node, root)