Lines Matching refs:struct

53 structures, each instance of struct rb_node is embedded in the data structure
62 Data nodes in an rbtree tree are structures containing a struct rb_node member::
64 struct mytype {
65 struct rb_node node;
69 When dealing with a pointer to the embedded struct rb_node, the containing data
76 struct rb_root mytree = RB_ROOT;
86 struct mytype *my_search(struct rb_root *root, char *string)
88 struct rb_node *node = root->rb_node;
91 struct mytype *data = container_of(node, struct mytype, node);
118 int my_insert(struct rb_root *root, struct mytype *data)
120 struct rb_node **new = &(root->rb_node), *parent = NULL;
124 struct mytype *this = container_of(*new, struct mytype, node);
148 void rb_erase(struct rb_node *victim, struct rb_root *tree);
152 struct mytype *data = mysearch(&mytree, "walrus");
161 void rb_replace_node(struct rb_node *old, struct rb_node *new,
162 struct rb_root *tree);
174 struct rb_node *rb_first(struct rb_root *tree);
175 struct rb_node *rb_last(struct rb_root *tree);
176 struct rb_node *rb_next(struct rb_node *node);
177 struct rb_node *rb_prev(struct rb_node *node);
185 The iterator functions return a pointer to the embedded struct rb_node, from
192 struct rb_node *node;
194 printk("key=%s\n", rb_entry(node, struct mytype, node)->keystring);
201 order for their own logic. To this end, users can use 'struct rb_root_cached'
209 struct rb_root_cached mytree = RB_ROOT_CACHED;
216 struct rb_node *rb_first_cached(struct rb_root_cached *tree);
217 void rb_insert_color_cached(struct rb_node *, struct rb_root_cached *, bool);
218 void rb_erase_cached(struct rb_node *node, struct rb_root_cached *);
223 void rb_insert_augmented_cached(struct rb_node *node, struct rb_root_cached *,
224 bool, struct rb_augment_callbacks *);
225 void rb_erase_augmented_cached(struct rb_node *, struct rb_root_cached *,
226 struct rb_augment_callbacks *);
260 In both cases, the callbacks are provided through struct rb_augment_callbacks.
301 struct interval_tree_node *
302 interval_tree_first_match(struct rb_root *root,
305 struct interval_tree_node *node;
309 node = rb_entry(root->rb_node, struct interval_tree_node, rb);
313 struct interval_tree_node *left =
315 struct interval_tree_node, rb);
334 struct interval_tree_node, rb);
346 compute_subtree_last(struct interval_tree_node *node)
351 struct interval_tree_node, rb)->__subtree_last;
357 struct interval_tree_node, rb)->__subtree_last;
364 static void augment_propagate(struct rb_node *rb, struct rb_node *stop)
367 struct interval_tree_node *node =
368 rb_entry(rb, struct interval_tree_node, rb);
377 static void augment_copy(struct rb_node *rb_old, struct rb_node *rb_new)
379 struct interval_tree_node *old =
380 rb_entry(rb_old, struct interval_tree_node, rb);
381 struct interval_tree_node *new =
382 rb_entry(rb_new, struct interval_tree_node, rb);
387 static void augment_rotate(struct rb_node *rb_old, struct rb_node *rb_new)
389 struct interval_tree_node *old =
390 rb_entry(rb_old, struct interval_tree_node, rb);
391 struct interval_tree_node *new =
392 rb_entry(rb_new, struct interval_tree_node, rb);
398 static const struct rb_augment_callbacks augment_callbacks = {
402 void interval_tree_insert(struct interval_tree_node *node,
403 struct rb_root *root)
405 struct rb_node **link = &root->rb_node, *rb_parent = NULL;
407 struct interval_tree_node *parent;
411 parent = rb_entry(rb_parent, struct interval_tree_node, rb);
425 void interval_tree_remove(struct interval_tree_node *node,
426 struct rb_root *root)