Lines Matching refs:rb_node
90 static void rb_tree_insert_rebalance(struct rb_tree *, struct rb_node *);
91 static void rb_tree_removal_rebalance(struct rb_tree *, struct rb_node *,
94 static const struct rb_node *rb_tree_iterate_const(const struct rb_tree *,
95 const struct rb_node *, const unsigned int);
96 static bool rb_tree_check_node(const struct rb_tree *, const struct rb_node *,
97 const struct rb_node *, bool);
136 struct rb_node *parent = rbt->rbt_root;
155 struct rb_node *parent = rbt->rbt_root, *last = NULL;
176 struct rb_node *parent = rbt->rbt_root, *last = NULL;
197 struct rb_node *parent, *tmp, *self = RB_ITEMTONODE(rbto, object);
205 * This is a hack. Because rbt->rbt_root is just a struct rb_node *,
206 * just like rb_node->rb_nodes[RB_DIR_LEFT], we can use this fact to
208 * updating RB_FATHER(rb_node)->rb_nodes[RB_POSITION(rb_node)] will
211 parent = (struct rb_node *)(void *)&rbt->rbt_root;
234 struct rb_node *prev = NULL, *next = NULL;
264 if (__predict_false(parent == (struct rb_node *)(void *)&rbt->rbt_root)) {
338 struct rb_node *old_father, const unsigned int which)
341 struct rb_node * const grandpa = RB_FATHER(old_father);
342 struct rb_node * const old_child = old_father->rb_nodes[which];
343 struct rb_node * const new_father = old_child;
344 struct rb_node * const new_child = old_father;
375 struct rb_node tmp;
401 rb_tree_insert_rebalance(struct rb_tree *rbt, struct rb_node *self)
403 struct rb_node * father = RB_FATHER(self);
404 struct rb_node * grandpa = RB_FATHER(father);
405 struct rb_node * uncle;
507 rb_tree_prune_node(struct rb_tree *rbt, struct rb_node *self, bool rebalance)
510 struct rb_node *father = RB_FATHER(self);
559 rb_node *self,
560 struct rb_node *standin)
564 struct rb_node *standin_son;
565 struct rb_node *standin_father = RB_FATHER(standin);
712 rb_tree_prune_blackred_branch(struct rb_tree *rbt, struct rb_node *self,
715 struct rb_node *father = RB_FATHER(self);
716 struct rb_node *son = self->rb_nodes[which];
760 struct rb_node *standin, *self = RB_ITEMTONODE(rbto, object);
822 rb_tree_removal_rebalance(struct rb_tree *rbt, struct rb_node *parent,
832 struct rb_node *brother = parent->rb_nodes[other];
977 struct rb_node *self;
1022 static const struct rb_node *
1023 rb_tree_iterate_const(const struct rb_tree *rbt, const struct rb_node *self,
1069 rb_tree_count_black(const struct rb_node *self)
1085 rb_tree_check_node(const struct rb_tree *rbt, const struct rb_node *self,
1086 const struct rb_node *prev, bool red_check)
1102 KASSERT(RB_FATHER(self) == (const struct rb_node *) &rbt->rbt_root);
1123 const struct rb_node *prev0 = rb_tree_iterate_const(rbt, self, RB_DIR_LEFT);
1124 const struct rb_node *next0 = rb_tree_iterate_const(rbt, self, RB_DIR_RIGHT);
1141 const struct rb_node *brother;
1198 const struct rb_node *relative0, *relative;
1270 const struct rb_node *prev0;
1271 const struct rb_node *next0;
1289 const struct rb_node *self;
1290 const struct rb_node *prev;
1331 rb_tree_mark_depth(const struct rb_tree *rbt, const struct rb_node *self,