Lines Matching refs:root
27 static struct rb_root_cached root = RB_ROOT_CACHED; variable
32 static void insert(struct test_node *node, struct rb_root_cached *root) in insert() argument
34 struct rb_node **new = &root->rb_root.rb_node, *parent = NULL; in insert()
46 rb_insert_color(&node->rb, &root->rb_root); in insert()
49 static void insert_cached(struct test_node *node, struct rb_root_cached *root) in insert_cached() argument
51 struct rb_node **new = &root->rb_root.rb_node, *parent = NULL; in insert_cached()
66 rb_insert_color_cached(&node->rb, root, leftmost); in insert_cached()
69 static inline void erase(struct test_node *node, struct rb_root_cached *root) in erase() argument
71 rb_erase(&node->rb, &root->rb_root); in erase()
74 static inline void erase_cached(struct test_node *node, struct rb_root_cached *root) in erase_cached() argument
76 rb_erase_cached(&node->rb, root); in erase_cached()
86 struct rb_root_cached *root) in RB_DECLARE_CALLBACKS_MAX()
88 struct rb_node **new = &root->rb_root.rb_node, *rb_parent = NULL; in RB_DECLARE_CALLBACKS_MAX()
106 rb_insert_augmented(&node->rb, &root->rb_root, &augment_callbacks); in RB_DECLARE_CALLBACKS_MAX()
110 struct rb_root_cached *root) in insert_augmented_cached() argument
112 struct rb_node **new = &root->rb_root.rb_node, *rb_parent = NULL; in insert_augmented_cached()
133 rb_insert_augmented_cached(&node->rb, root, in insert_augmented_cached()
138 static void erase_augmented(struct test_node *node, struct rb_root_cached *root) in erase_augmented() argument
140 rb_erase_augmented(&node->rb, &root->rb_root, &augment_callbacks); in erase_augmented()
144 struct rb_root_cached *root) in erase_augmented_cached() argument
146 rb_erase_augmented_cached(&node->rb, root, &augment_callbacks); in erase_augmented_cached()
175 rbtree_postorder_for_each_entry_safe(cur, n, &root.rb_root, rb) in check_postorder_foreach()
185 for (rb = rb_first_postorder(&root.rb_root); rb; rb = rb_next_postorder(rb)) in check_postorder()
197 for (rb = rb_first(&root.rb_root); rb; rb = rb_next(rb)) { in check()
212 WARN_ON_ONCE(count < (1 << black_path_count(rb_last(&root.rb_root))) - 1); in check()
223 for (rb = rb_first(&root.rb_root); rb; rb = rb_next(rb)) { in check_augmented()
261 insert(nodes + j, &root); in rbtree_test_init()
263 erase(nodes + j, &root); in rbtree_test_init()
277 insert_cached(nodes + j, &root); in rbtree_test_init()
279 erase_cached(nodes + j, &root); in rbtree_test_init()
290 insert(nodes + i, &root); in rbtree_test_init()
295 for (node = rb_first(&root.rb_root); node; node = rb_next(node)) in rbtree_test_init()
309 node = rb_first(&root.rb_root); in rbtree_test_init()
321 node = rb_first_cached(&root); in rbtree_test_init()
330 erase(nodes + i, &root); in rbtree_test_init()
337 insert(nodes + j, &root); in rbtree_test_init()
341 erase(nodes + j, &root); in rbtree_test_init()
354 insert_augmented(nodes + j, &root); in rbtree_test_init()
356 erase_augmented(nodes + j, &root); in rbtree_test_init()
369 insert_augmented_cached(nodes + j, &root); in rbtree_test_init()
371 erase_augmented_cached(nodes + j, &root); in rbtree_test_init()
384 insert_augmented(nodes + j, &root); in rbtree_test_init()
388 erase_augmented(nodes + j, &root); in rbtree_test_init()