Lines Matching refs:child
113 static uint8_t get_side(struct rbnode *parent, struct rbnode *child) in get_side() argument
115 CHECK(get_child(parent, 0U) == child || get_child(parent, 1U) == child); in get_side()
117 return (get_child(parent, 1U) == child) ? 1U : 0U; in get_side()
135 struct rbnode *child = stack[stacksz - 1]; in rotate() local
136 uint8_t side = get_side(parent, child); in rotate()
137 struct rbnode *a = get_child(child, side); in rotate()
138 struct rbnode *b = get_child(child, (side == 0U) ? 1U : 0U); in rotate()
143 set_child(grandparent, get_side(grandparent, parent), child); in rotate()
146 set_child(child, side, a); in rotate()
147 set_child(child, (side == 0U) ? 1U : 0U, parent); in rotate()
149 stack[stacksz - 2] = child; in rotate()
456 struct rbnode *child = get_child(node, 0U); in rb_remove() local
458 if (child == NULL) { in rb_remove()
459 child = get_child(node, 1U); in rb_remove()
464 tree->root = child; in rb_remove()
465 if (child != NULL) { in rb_remove()
466 set_color(child, BLACK); in rb_remove()
480 if (child == NULL) { in rb_remove()
488 set_child(parent, get_side(parent, node), child); in rb_remove()
493 __ASSERT(is_black(node) || is_black(child), "both nodes red?!"); in rb_remove()
494 if (is_red(node) || is_red(child)) { in rb_remove()
495 set_color(child, BLACK); in rb_remove()