Lines Matching refs:node_t
14 typedef struct node_s node_t; typedef
19 rb_node(node_t) link;
24 node_cmp(const node_t *a, const node_t *b) { in node_cmp()
42 typedef rb_tree(node_t) tree_t;
43 rb_gen(static, tree_, tree_t, node_t, link, node_cmp);
48 node_t key; in TEST_BEGIN()
71 tree_recurse(node_t *node, unsigned black_height, unsigned black_depth) in tree_recurse()
74 node_t *left_node; in tree_recurse()
75 node_t *right_node; in tree_recurse()
80 left_node = rbtn_left_get(node_t, link, node); in tree_recurse()
81 right_node = rbtn_right_get(node_t, link, node); in tree_recurse()
83 if (!rbtn_red_get(node_t, link, node)) in tree_recurse()
87 if (rbtn_red_get(node_t, link, node)) { in tree_recurse()
89 assert_false(rbtn_red_get(node_t, link, left_node), in tree_recurse()
92 assert_false(rbtn_red_get(node_t, link, right_node), in tree_recurse()
114 static node_t *
115 tree_iterate_cb(tree_t *tree, node_t *node, void *data) in tree_iterate_cb()
118 node_t *search_node; in tree_iterate_cb()
165 node_remove(tree_t *tree, node_t *node, unsigned nnodes) in node_remove()
167 node_t *search_node; in node_remove()
188 rbtn_black_height(node_t, link, tree, black_height); in node_remove()
197 static node_t *
198 remove_iterate_cb(tree_t *tree, node_t *node, void *data) in remove_iterate_cb()
201 node_t *ret = tree_next(tree, node); in remove_iterate_cb()
208 static node_t *
209 remove_reverse_iterate_cb(tree_t *tree, node_t *node, void *data) in remove_reverse_iterate_cb()
212 node_t *ret = tree_prev(tree, node); in remove_reverse_iterate_cb()
220 destroy_cb(node_t *node, void *data) in destroy_cb()
236 node_t nodes[NNODES]; in TEST_BEGIN()
269 rbtn_black_height(node_t, link, &tree, in TEST_BEGIN()
303 node_t *start; in TEST_BEGIN()
316 node_t *start; in TEST_BEGIN()