Lines Matching defs:root
75 dns_rbtnode_t * root;
297 return rbt->root;
349 * Upper node is the parent of the root of the passed node's
375 fixup_uppernodes_helper(rbt->root, NULL);
390 /* Upper node is the parent of the root of the passed node's
395 dns_rbtnode_t *root = get_subtree_root(node);
402 return (PARENT(root));
740 CHECK(serialize_nodes(file, rbt->root, 0, datawriter,
940 rbt->root = (dns_rbtnode_t *)((char *)base_address +
949 CHECK(treefix(rbt, base_address, filesize, rbt->root,
974 *originp = rbt->root;
978 rbt->root = NULL;
1010 rbt->root = NULL;
1047 deletetreeflat(rbt, quantum, ISC_FALSE, &rbt->root);
1048 if (rbt->root != NULL)
1141 dns_rbtnode_t **root, *parent, *child, *current, *new_current;
1195 if (ISC_UNLIKELY(rbt->root == NULL)) {
1203 rbt->root = new_current;
1217 root = &rbt->root;
1218 INSIST(IS_ROOT(*root));
1221 child = *root;
1281 root = &DOWN(current);
1283 INSIST(*root == NULL ||
1284 (IS_ROOT(*root) &&
1285 PARENT(*root) == current));
1359 if (*root == current)
1360 *root = new_current;
1366 * Set up the new root of the next level.
1373 root = &DOWN(new_current);
1437 if (*root == NULL)
1440 UPPERNODE(new_current) = PARENT(*root);
1442 addonlevel(new_current, current, order, root);
1518 if (ISC_UNLIKELY(rbt->root == NULL))
1546 current = rbt->root;
1566 * Here, current is pointing at a subtree root
1583 * The case of current not being a subtree root,
1596 * current is the root of the current level, so
2153 deletefromlevel(node, parent == NULL ? &rbt->root : &DOWN(parent));
2485 dns_rbtnode_t *child, *root, *parent, *grandparent;
2494 root = *rootp;
2495 if (root == NULL) {
2506 child = root;
2528 while (node != root && IS_RED(PARENT(node))) {
2547 rotate_left(parent, &root);
2554 rotate_right(grandparent, &root);
2565 rotate_right(parent, &root);
2572 rotate_left(grandparent, &root);
2577 MAKE_BLACK(root);
2578 ENSURE(IS_ROOT(root));
2579 *rootp = root;
2724 * This is the root being deleted, and at this point
2838 dns_rbtnode_t *root = *nodep;
2840 while (root != NULL) {
2845 if (LEFT(root) != NULL) {
2846 dns_rbtnode_t *node = root;
2847 root = LEFT(root);
2849 } else if (RIGHT(root) != NULL) {
2850 dns_rbtnode_t *node = root;
2851 root = RIGHT(root);
2853 } else if (DOWN(root) != NULL) {
2854 dns_rbtnode_t *node = root;
2855 root = DOWN(root);
2862 dns_rbtnode_t *node = root;
2863 root = PARENT(root);
2883 *nodep = root;
2905 return (getheight_helper(rbt->root));
2936 * a subtree root and must have the flag set.
2985 if (!check_properties_helper(rbt->root))
2993 return (check_black_distance_helper(rbt->root, &dd));
3052 print_text_helper(dns_rbtnode_t *root, dns_rbtnode_t *parent,
3058 if (root != NULL) {
3059 printnodename(root, ISC_TRUE, f);
3061 IS_RED(root) ? "RED" : "BLACK");
3063 if ((! IS_ROOT(root) && PARENT(root) != parent) ||
3064 ( IS_ROOT(root) && depth > 0 &&
3065 DOWN(PARENT(root)) != root)) {
3068 if (PARENT(root) != NULL)
3069 printnodename(PARENT(root), ISC_TRUE, f);
3077 if (root->data != NULL && data_printer != NULL) {
3078 fprintf(f, " data@%p: ", root->data);
3079 data_printer(f, root->data);
3085 if (IS_RED(root) && IS_RED(LEFT(root)))
3087 print_text_helper(LEFT(root), root, depth, "left",
3090 if (IS_RED(root) && IS_RED(RIGHT(root)))
3092 print_text_helper(RIGHT(root), root, depth, "right",
3095 print_text_helper(DOWN(root), NULL, depth, "down",
3108 print_text_helper(rbt->root, NULL, 0, "root", data_printer, f);
3140 /* XXXMUKS: verify that IS_ROOT() indicates subtree root and not
3141 * forest root.
3172 print_dot_helper(rbt->root, &nodecount, show_pointers, f);
3268 * No left links, so move toward the root. If at any point on
3320 * Got to the root of this level without having traversed
3397 * root level will never be more than one name, and everything
3503 * Head back toward the root of the tree, looking for any path
3505 * that left link. In the event the root of the level is
3524 * Reached the root without having traversed
3533 * now be pointing to a root node which
3538 * reached the root node on level 0.
3575 * root level will never be more than one name, and everything
3611 chain->end = rbt->root;
3633 result = move_chain_to_last(chain, rbt->root);