Lines Matching refs:child
228 int child = AVL_INDEX2CHILD(where); in avl_nearest() local
238 if (child != direction) in avl_nearest()
259 int child = 0; in avl_find() local
264 node = node->avl_child[child]) { in avl_find()
277 child = avl_balance2child[1 + diff]; in avl_find()
282 *where = AVL_MKINDEX(prev, child); in avl_find()
310 avl_node_t *child = node->avl_child[left]; in avl_rotation() local
316 int child_bal = AVL_XBALANCE(child); in avl_rotation()
358 cright = child->avl_child[right]; in avl_rotation()
368 child->avl_child[right] = node; in avl_rotation()
371 AVL_SETPARENT(node, child); in avl_rotation()
376 AVL_SETBALANCE(child, child_bal); in avl_rotation()
377 AVL_SETCHILD(child, which_child); in avl_rotation()
378 AVL_SETPARENT(child, parent); in avl_rotation()
380 parent->avl_child[which_child] = child; in avl_rotation()
382 tree->avl_root = child; in avl_rotation()
420 gchild = child->avl_child[right]; in avl_rotation()
435 child->avl_child[right] = gleft; in avl_rotation()
437 AVL_SETPARENT(gleft, child); in avl_rotation()
449 gchild->avl_child[left] = child; in avl_rotation()
450 AVL_SETBALANCE(child, (balance == right_heavy ? left_heavy : 0)); in avl_rotation()
451 AVL_SETPARENT(child, gchild); in avl_rotation()
452 AVL_SETCHILD(child, left); in avl_rotation()
579 int child = direction; /* rely on AVL_BEFORE == 0, AVL_AFTER == 1 */ in avl_insert_here() local
599 ASSERT(diff > 0 ? child == 1 : child == 0); in avl_insert_here()
602 if (node->avl_child[child] != NULL) { in avl_insert_here()
603 node = node->avl_child[child]; in avl_insert_here()
604 child = 1 - child; in avl_insert_here()
605 while (node->avl_child[child] != NULL) { in avl_insert_here()
611 ASSERT(diff > 0 ? child == 1 : child == 0); in avl_insert_here()
613 node = node->avl_child[child]; in avl_insert_here()
620 ASSERT(diff > 0 ? child == 1 : child == 0); in avl_insert_here()
623 ASSERT(node->avl_child[child] == NULL); in avl_insert_here()
625 avl_insert(tree, new_data, AVL_MKINDEX(node, child)); in avl_insert_here()
977 int child; in avl_destroy_nodes() local
1016 child = (uintptr_t)(*cookie) & CHILDBIT; in avl_destroy_nodes()
1017 parent->avl_child[child] = NULL; in avl_destroy_nodes()
1024 if (child == 1 || parent->avl_child[1] == NULL) { in avl_destroy_nodes()