Function report |
Source Code:lib\rbtree.c |
Create Date:2022-07-28 06:12:41 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Inline version for rb_erase() use - we want to be able to inline* and eliminate the dummy_rotate callback there
Proto:static __always_inline void ____rb_erase_color(struct rb_node *parent, struct rb_root *root, void (*augment_rotate)(struct rb_node *old, struct rb_node *new))
Type:void
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct rb_node * | parent | |
| struct rb_root * | root | |
| void (* | augment_rotate |
| 232 | When (true) cycle |
| 253 | WRITE_ONCE(rb_right, tmp1) |
| 254 | WRITE_ONCE(rb_left, parent) |
| 255 | rb_set_parent_color(tmp1, parent, RB_BLACK) |
| 258 | augment_rotate(parent, sibling) |
| 262 | If Not tmp1 || rb_is_black(tmp1) Then |
| 264 | If Not tmp2 || rb_is_black(tmp2) Then |
| 280 | rb_set_parent_color(sibling, parent, RB_RED) |
| 282 | If rb_is_red(parent) Then Notes on lockless lookups:* All stores to the tree structure (rb_left and rb_right) must be done using* WRITE_ONCE() |
| 284 | Else |
| 290 | Break |
| 320 | WRITE_ONCE(rb_left, tmp1) |
| 321 | WRITE_ONCE(rb_right, sibling) |
| 322 | WRITE_ONCE(rb_right, tmp2) |
| 323 | If tmp1 Then rb_set_parent_color(tmp1, sibling, RB_BLACK) |
| 326 | augment_rotate(sibling, tmp2) |
| 343 | WRITE_ONCE(rb_right, tmp2) |
| 344 | WRITE_ONCE(rb_left, parent) |
| 345 | rb_set_parent_color(tmp1, sibling, RB_BLACK) |
| 346 | If tmp2 Then rb_set_parent(tmp2, parent) |
| 350 | augment_rotate(parent, sibling) |
| 351 | Break |
| 352 | Else |
| 357 | WRITE_ONCE(rb_left, tmp1) |
| 358 | WRITE_ONCE(rb_right, parent) |
| 359 | rb_set_parent_color(tmp1, parent, RB_BLACK) |
| 362 | augment_rotate(parent, sibling) |
| 366 | If Not tmp1 || rb_is_black(tmp1) Then |
| 368 | If Not tmp2 || rb_is_black(tmp2) Then |
| 370 | rb_set_parent_color(sibling, parent, RB_RED) |
| 372 | If rb_is_red(parent) Then Notes on lockless lookups:* All stores to the tree structure (rb_left and rb_right) must be done using* WRITE_ONCE() |
| 374 | Else |
| 380 | Break |
| 384 | WRITE_ONCE(rb_right, tmp1) |
| 385 | WRITE_ONCE(rb_left, sibling) |
| 386 | WRITE_ONCE(rb_left, tmp2) |
| 387 | If tmp1 Then rb_set_parent_color(tmp1, sibling, RB_BLACK) |
| 390 | augment_rotate(sibling, tmp2) |
| 396 | WRITE_ONCE(rb_left, tmp2) |
| 397 | WRITE_ONCE(rb_right, parent) |
| 398 | rb_set_parent_color(tmp1, sibling, RB_BLACK) |
| 399 | If tmp2 Then rb_set_parent(tmp2, parent) |
| 403 | augment_rotate(parent, sibling) |
| 404 | Break |
| Name | Describe |
|---|---|
| __rb_erase_color | Non-inline version for rb_erase_augmented() use |
| rb_erase |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |