Lines Matching refs:child
227 int child = AVL_INDEX2CHILD(where); in avl_nearest() local
237 if (child != direction) in avl_nearest()
258 int child = 0; in avl_find() local
263 node = node->avl_child[child]) { in avl_find()
276 child = avl_balance2child[1 + diff]; in avl_find()
281 *where = AVL_MKINDEX(prev, child); in avl_find()
309 avl_node_t *child = node->avl_child[left]; in avl_rotation() local
315 int child_bal = AVL_XBALANCE(child); in avl_rotation()
357 cright = child->avl_child[right]; in avl_rotation()
367 child->avl_child[right] = node; in avl_rotation()
370 AVL_SETPARENT(node, child); in avl_rotation()
375 AVL_SETBALANCE(child, child_bal); in avl_rotation()
376 AVL_SETCHILD(child, which_child); in avl_rotation()
377 AVL_SETPARENT(child, parent); in avl_rotation()
379 parent->avl_child[which_child] = child; in avl_rotation()
381 tree->avl_root = child; in avl_rotation()
419 gchild = child->avl_child[right]; in avl_rotation()
434 child->avl_child[right] = gleft; in avl_rotation()
436 AVL_SETPARENT(gleft, child); in avl_rotation()
448 gchild->avl_child[left] = child; in avl_rotation()
449 AVL_SETBALANCE(child, (balance == right_heavy ? left_heavy : 0)); in avl_rotation()
450 AVL_SETPARENT(child, gchild); in avl_rotation()
451 AVL_SETCHILD(child, left); in avl_rotation()
578 int child = direction; /* rely on AVL_BEFORE == 0, AVL_AFTER == 1 */ in avl_insert_here() local
598 ASSERT(diff > 0 ? child == 1 : child == 0); in avl_insert_here()
601 if (node->avl_child[child] != NULL) { in avl_insert_here()
602 node = node->avl_child[child]; in avl_insert_here()
603 child = 1 - child; in avl_insert_here()
604 while (node->avl_child[child] != NULL) { in avl_insert_here()
610 ASSERT(diff > 0 ? child == 1 : child == 0); in avl_insert_here()
612 node = node->avl_child[child]; in avl_insert_here()
619 ASSERT(diff > 0 ? child == 1 : child == 0); in avl_insert_here()
622 ASSERT(node->avl_child[child] == NULL); in avl_insert_here()
624 avl_insert(tree, new_data, AVL_MKINDEX(node, child)); in avl_insert_here()
973 int child; in avl_destroy_nodes() local
1012 child = (uintptr_t)(*cookie) & CHILDBIT; in avl_destroy_nodes()
1013 parent->avl_child[child] = NULL; in avl_destroy_nodes()
1020 if (child == 1 || parent->avl_child[1] == NULL) { in avl_destroy_nodes()