Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__rb_erase_augmented

Proto:static __always_inline struct rb_node *__rb_erase_augmented(struct rb_node *node, struct rb_root *root, const struct rb_augment_callbacks *augment)

Type:struct rb_node

Parameter:

TypeParameterName
struct rb_node *node
struct rb_root *root
const struct rb_augment_callbacks *augment
201  child = rb_right
202  tmp = rb_left
206  If Not tmp Then
214  pc = __rb_parent_color
215  parent = __rb_parent(pc)
216  __rb_change_child(node, child, parent, root)
217  If child Then
219  rebalance = NULL
220  Else rebalance = __rb_is_black(pc) ? parent : NULL
222  tmp = parent
223  Else if Not child Then
225  __rb_parent_color = pc = __rb_parent_color
226  parent = __rb_parent(pc)
227  __rb_change_child(node, tmp, parent, root)
228  rebalance = NULL
229  tmp = parent
230  Else
231  successor = child
233  tmp = rb_left
234  If Not tmp Then
244  parent = successor
245  child2 = rb_right
247  copy(node, successor)
248  Else
263  Do
264  parent = successor
265  successor = tmp
266  tmp = rb_left
267  When tmp cycle
268  child2 = rb_right
273  copy(node, successor)
277  tmp = rb_left
278  WRITE_ONCE(rb_left, tmp)
279  rb_set_parent(tmp, successor)
281  pc = __rb_parent_color
282  tmp = __rb_parent(pc)
283  __rb_change_child(node, successor, tmp, root)
285  If child2 Then
287  rebalance = NULL
288  Else
291  __rb_parent_color = pc
292  tmp = successor
295  propagate(tmp, NULL)
296  Return rebalance
Caller
NameDescribe
rb_erase