函数逻辑报告 |
Source Code:lib\rbtree.c |
Create Date:2022-07-27 07:09:58 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:__rb_insert
函数原型: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))
返回类型:void
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| struct rb_node * | node | |
| struct rb_root * | root | |
| void (* | augment_rotate |
| 88 | parent等于rb_red_parent(node) |
| 90 | 当(true)循环 |
| 94 | 如果此条件成立可能性小(为编译器优化)(!parent)则 |
| 100 | rb_set_parent_color(node, NULL, RB_BLACK) |
| 101 | 退出 |
| 110 | 如果rb_is_black(parent)则退出 |
| 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 | 继续下一循环 |
| 155 | WRITE_ONCE(rb_right, tmp) |
| 156 | WRITE_ONCE(rb_left, parent) |
| 157 | 如果tmp则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 | 如果tmp则rb_set_parent_color(tmp, gparent, RB_BLACK) |
| 181 | augment_rotate(gparent, parent) |
| 182 | 退出 |
| 183 | 否则 |
| 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 | 继续下一循环 |
| 199 | WRITE_ONCE(rb_left, tmp) |
| 200 | WRITE_ONCE(rb_right, parent) |
| 201 | 如果tmp则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 | 如果tmp则rb_set_parent_color(tmp, gparent, RB_BLACK) |
| 216 | augment_rotate(gparent, parent) |
| 217 | 退出 |
| 名称 | 描述 |
|---|---|
| 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. |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |