Lines Matching refs:tree

17 static void nxt_rbtree_delete_fixup(nxt_rbtree_t *tree,
29 #define nxt_rbtree_comparison_callback(tree) \ argument
30 ((nxt_rbtree_compare_t) (tree)->sentinel.right)
34 nxt_rbtree_init(nxt_rbtree_t *tree, nxt_rbtree_compare_t compare) in nxt_rbtree_init() argument
46 tree->sentinel.left = &tree->sentinel; in nxt_rbtree_init()
52 tree->sentinel.right = (void *) compare; in nxt_rbtree_init()
55 tree->sentinel.color = NXT_RBTREE_BLACK; in nxt_rbtree_init()
60 nxt_rbtree_insert(nxt_rbtree_t *tree, nxt_rbtree_part_t *part) in nxt_rbtree_insert() argument
67 node = nxt_rbtree_root(tree); in nxt_rbtree_insert()
68 sentinel = nxt_rbtree_sentinel(tree); in nxt_rbtree_insert()
74 compare = (nxt_rbtree_compare_t) tree->sentinel.right; in nxt_rbtree_insert()
75 child = &nxt_rbtree_root(tree); in nxt_rbtree_insert()
91 node = nxt_rbtree_root(tree); in nxt_rbtree_insert()
180 nxt_rbtree_find(nxt_rbtree_t *tree, nxt_rbtree_part_t *part) in nxt_rbtree_find() argument
188 next = nxt_rbtree_root(tree); in nxt_rbtree_find()
189 sentinel = nxt_rbtree_sentinel(tree); in nxt_rbtree_find()
190 compare = nxt_rbtree_comparison_callback(tree); in nxt_rbtree_find()
214 nxt_rbtree_find_less_or_equal(nxt_rbtree_t *tree, nxt_rbtree_part_t *part) in nxt_rbtree_find_less_or_equal() argument
223 next = nxt_rbtree_root(tree); in nxt_rbtree_find_less_or_equal()
224 sentinel = nxt_rbtree_sentinel(tree); in nxt_rbtree_find_less_or_equal()
225 compare = nxt_rbtree_comparison_callback(tree); in nxt_rbtree_find_less_or_equal()
251 nxt_rbtree_find_greater_or_equal(nxt_rbtree_t *tree, nxt_rbtree_part_t *part) in nxt_rbtree_find_greater_or_equal() argument
260 next = nxt_rbtree_root(tree); in nxt_rbtree_find_greater_or_equal()
261 sentinel = nxt_rbtree_sentinel(tree); in nxt_rbtree_find_greater_or_equal()
262 compare = nxt_rbtree_comparison_callback(tree); in nxt_rbtree_find_greater_or_equal()
288 nxt_rbtree_delete(nxt_rbtree_t *tree, nxt_rbtree_part_t *part) in nxt_rbtree_delete() argument
296 sentinel = nxt_rbtree_sentinel(tree); in nxt_rbtree_delete()
305 subst = nxt_rbtree_branch_min(tree, node->right); in nxt_rbtree_delete()
334 nxt_rbtree_delete_fixup(tree, child); in nxt_rbtree_delete()
340 nxt_rbtree_delete_fixup(nxt_rbtree_t *tree, nxt_rbtree_node_t *node) in nxt_rbtree_delete_fixup() argument
344 while (node != nxt_rbtree_root(tree) && node->color == NXT_RBTREE_BLACK) { in nxt_rbtree_delete_fixup()
503 nxt_rbtree_destroy_next(nxt_rbtree_t *tree, nxt_rbtree_node_t **next) in nxt_rbtree_destroy_next() argument
507 sentinel = nxt_rbtree_sentinel(tree); in nxt_rbtree_destroy_next()