Home | History | Annotate | Download | only in gen

Lines Matching refs:standin

560 	struct rb_node *standin)
562 const unsigned int standin_which = RB_POSITION(standin);
565 struct rb_node *standin_father = RB_FATHER(standin);
566 bool rebalance = RB_BLACK_P(standin);
573 KASSERT(RB_SENTINEL_P(standin->rb_nodes[standin_other]));
574 standin_son = standin->rb_nodes[standin_which];
580 KASSERT(RB_SENTINEL_P(standin->rb_nodes[standin_which]));
581 standin_son = standin->rb_nodes[standin_other];
589 * If standin has a child, it must be red.
597 KASSERT(rb_tree_check_node(rbt, standin, NULL, false));
622 * If we are about to delete the standin's father, then when
625 * our standin's father we only need to reparent the standin's
632 KASSERT(RB_SENTINEL_P(standin->rb_nodes[standin_other]));
634 KASSERT(self->rb_nodes[standin_which] == standin);
636 * Have our son/standin adopt his brother as his new son.
638 standin_father = standin;
645 * Sever standin's connection to his father.
651 standin->rb_nodes[standin_other] = self->rb_nodes[standin_other];
652 RB_SET_FATHER(standin->rb_nodes[standin_other], standin);
662 * Move the only remaining son to our standin. If our standin is our
665 KASSERT(standin->rb_nodes[standin_other] != self->rb_nodes[standin_other]);
666 standin->rb_nodes[standin_other] = self->rb_nodes[standin_other];
667 RB_SET_FATHER(standin->rb_nodes[standin_other], standin);
670 * Now copy the result of self to standin and then replace
671 * self with standin in the tree.
673 RB_COPY_PROPERTIES(standin, self);
674 RB_SET_FATHER(standin, RB_FATHER(self));
675 RB_FATHER(standin)->rb_nodes[RB_POSITION(standin)] = standin;
689 KASSERT(rb_tree_check_node(rbt, standin, NULL, false));
690 KASSERT(RB_FATHER_SENTINEL_P(standin)
692 KASSERT(RB_LEFT_SENTINEL_P(standin)
693 || rb_tree_check_node(rbt, standin->rb_left, NULL, false));
694 KASSERT(RB_RIGHT_SENTINEL_P(standin)
695 || rb_tree_check_node(rbt, standin->rb_right, NULL, false));
701 KASSERT(rb_tree_check_node(rbt, standin, NULL, true));
760 struct rb_node *standin, *self = RB_ITEMTONODE(rbto, object);
817 standin = RB_ITEMTONODE(rbto, rb_tree_iterate(rbt, object, which));
818 rb_tree_swap_prune_and_rebalance(rbt, self, standin);