• Home
  • Raw
  • Download

Lines Matching refs:node

32 static void insert(struct test_node *node, struct rb_root_cached *root)  in insert()  argument
35 u32 key = node->key; in insert()
45 rb_link_node(&node->rb, parent, new); 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
52 u32 key = node->key; in insert_cached()
65 rb_link_node(&node->rb, parent, new); 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()
80 #define NODE_VAL(node) ((node)->val) argument
85 static void insert_augmented(struct test_node *node, in RB_DECLARE_CALLBACKS_MAX()
89 u32 key = node->key; in RB_DECLARE_CALLBACKS_MAX()
90 u32 val = node->val; in RB_DECLARE_CALLBACKS_MAX()
104 node->augmented = val; in RB_DECLARE_CALLBACKS_MAX()
105 rb_link_node(&node->rb, rb_parent, new); in RB_DECLARE_CALLBACKS_MAX()
106 rb_insert_augmented(&node->rb, &root->rb_root, &augment_callbacks); in RB_DECLARE_CALLBACKS_MAX()
109 static void insert_augmented_cached(struct test_node *node, in insert_augmented_cached() argument
113 u32 key = node->key; in insert_augmented_cached()
114 u32 val = node->val; in insert_augmented_cached()
131 node->augmented = val; in insert_augmented_cached()
132 rb_link_node(&node->rb, rb_parent, new); 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()
143 static void erase_augmented_cached(struct test_node *node, in erase_augmented_cached() argument
146 rb_erase_augmented_cached(&node->rb, root, &augment_callbacks); in erase_augmented_cached()
198 struct test_node *node = rb_entry(rb, struct test_node, rb); in check() local
199 WARN_ON_ONCE(node->key < prev_key); in check()
207 prev_key = node->key; in check()
224 struct test_node *node = rb_entry(rb, struct test_node, rb); in check_augmented() local
225 u32 subtree, max = node->val; in check_augmented()
226 if (node->rb.rb_left) { in check_augmented()
227 subtree = rb_entry(node->rb.rb_left, struct test_node, in check_augmented()
232 if (node->rb.rb_right) { in check_augmented()
233 subtree = rb_entry(node->rb.rb_right, struct test_node, in check_augmented()
238 WARN_ON_ONCE(node->augmented != max); in check_augmented()
246 struct rb_node *node; in rbtree_test_init() local
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()