Lines Matching defs:rebalance
199 bool rebalance;
270 rebalance = false;
283 * All new nodes are colored red. We only need to rebalance
287 rebalance = RB_RED_P(parent);
315 KASSERT(rb_tree_check_node(rbt, self, NULL, !rebalance));
318 * Rebalance tree after insertion
320 if (rebalance) {
507 rb_tree_prune_node(struct rb_tree *rbt, struct rb_node *self, bool rebalance)
515 KASSERT(rebalance || (RB_ROOT_P(rbt, self) || RB_RED_P(self)));
516 KASSERT(!rebalance || RB_BLACK_P(self));
548 * Rebalance if requested.
550 if (rebalance)
566 bool rebalance = RB_BLACK_P(standin);
602 * we don't have to rebalance.
606 rebalance = false;
623 * we call rebalance, we need to use ourselves as our father.
697 if (!rebalance)
784 const bool rebalance = RB_BLACK_P(self) && !RB_ROOT_P(rbt, self);
785 rb_tree_prune_node(rbt, self, rebalance);
815 * Now swap it with ourself, "prune" it, and rebalance, if needed.