Function report |
Source Code:lib\rbtree.c |
Create Date:2022-07-28 06:12:40 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:__rb_insert
Proto:static __always_inline void __rb_insert(struct rb_node *node, struct rb_root *root, void (*augment_rotate)(struct rb_node *old, struct rb_node *new))
Type:void
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct rb_node * | node | |
| struct rb_root * | root | |
| void (* | augment_rotate |
| 88 | parent = rb_red_parent(node) |
| 90 | When (true) cycle |
| 100 | rb_set_parent_color(node, NULL, RB_BLACK) |
| 101 | Break |
| 110 | If rb_is_black(parent) Then Break |
| 113 | gparent = rb_red_parent(parent) |
| 131 | rb_set_parent_color(tmp, gparent, RB_BLACK) |
| 132 | rb_set_parent_color(parent, gparent, RB_BLACK) |
| 135 | rb_set_parent_color(node, parent, RB_RED) |
| 136 | Continue |
| 155 | WRITE_ONCE(rb_right, tmp) |
| 156 | WRITE_ONCE(rb_left, parent) |
| 157 | If tmp Then rb_set_parent_color(tmp, parent, RB_BLACK) |
| 160 | rb_set_parent_color(parent, node, RB_RED) |
| 161 | augment_rotate(parent, node) |
| 176 | WRITE_ONCE(rb_left, tmp) |
| 177 | WRITE_ONCE(rb_right, gparent) |
| 178 | If tmp Then rb_set_parent_color(tmp, gparent, RB_BLACK) |
| 181 | augment_rotate(gparent, parent) |
| 182 | Break |
| 183 | Else |
| 187 | rb_set_parent_color(tmp, gparent, RB_BLACK) |
| 188 | rb_set_parent_color(parent, gparent, RB_BLACK) |
| 191 | rb_set_parent_color(node, parent, RB_RED) |
| 192 | Continue |
| 199 | WRITE_ONCE(rb_left, tmp) |
| 200 | WRITE_ONCE(rb_right, parent) |
| 201 | If tmp Then rb_set_parent_color(tmp, parent, RB_BLACK) |
| 204 | rb_set_parent_color(parent, node, RB_RED) |
| 205 | augment_rotate(parent, node) |
| 211 | WRITE_ONCE(rb_right, tmp) |
| 212 | WRITE_ONCE(rb_left, gparent) |
| 213 | If tmp Then rb_set_parent_color(tmp, gparent, RB_BLACK) |
| 216 | augment_rotate(gparent, parent) |
| 217 | Break |
| Name | Describe |
|---|---|
| rb_insert_color | |
| __rb_insert_augmented | Augmented rbtree manipulation functions.* This instantiates the same __always_inline functions as in the non-augmented* case, but this time with user-defined callbacks. |
| 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 |