Lines Matching defs:parent

64  *	  there is an explicit "parent" link in the avl_node_t.
128 * - otherwise we return through parent nodes until we've come from a right
309 avl_node_t *parent = AVL_XPARENT(node);
378 AVL_SETPARENT(child, parent);
379 if (parent != NULL)
380 parent->avl_child[which_child] = child;
446 * fixup parent of all this to point to gchild
460 AVL_SETPARENT(gchild, parent);
462 if (parent != NULL)
463 parent->avl_child[which_child] = gchild;
476 * which will be the parent of the new node.
485 avl_node_t *parent = AVL_INDEX2NODE(where);
508 AVL_SETPARENT(node, parent);
509 if (parent != NULL) {
510 ASSERT(parent->avl_child[which_child] == NULL);
511 parent->avl_child[which_child] = node;
523 node = parent;
549 parent = AVL_XPARENT(node);
681 avl_node_t *parent;
733 parent = AVL_XPARENT(node);
734 if (parent != NULL)
735 parent->avl_child[AVL_XCHILD(node)] = node;
743 * It always has a parent and at most 1 child.
746 parent = AVL_XPARENT(delete);
747 parent->avl_child[AVL_XCHILD(delete)] = delete;
760 parent = AVL_XPARENT(delete);
768 * Connect parent directly to node (leaving out delete).
771 AVL_SETPARENT(node, parent);
774 if (parent == NULL) {
778 parent->avl_child[which_child] = node;
782 * Since the subtree is now shorter, begin adjusting parent balances
790 * Capture the parent and which_child values for the next
793 node = parent;
796 parent = AVL_XPARENT(node);
820 } while (parent != NULL);
967 * The cookie is really an avl_node_t to the current node's parent and
976 avl_node_t *parent;
996 parent = AVL_XPARENT(node);
1001 * If there is no parent to return to we are done.
1003 parent = (avl_node_t *)((uintptr_t)(*cookie) & ~CHILDBIT);
1004 if (parent == NULL) {
1014 * Remove the child pointer we just visited from the parent and tree.
1017 parent->avl_child[child] = NULL;
1022 * If we just did a right child or there isn't one, go up to parent.
1024 if (child == 1 || parent->avl_child[1] == NULL) {
1025 node = parent;
1026 parent = AVL_XPARENT(parent);
1031 * Do parent's right child, then leftmost descendent.
1033 node = parent->avl_child[1];
1035 parent = node;
1046 parent = node;
1055 if (parent == NULL) {
1059 *cookie = (void *)((uintptr_t)parent | AVL_XCHILD(node));