Lines Matching refs:rb_node

26 #define rb_parent(r)   ((struct rb_node *)((r)->__rb_parent_color & ~3))
30 #define RB_EMPTY_ROOT(root) (READ_ONCE((root)->rb_node) == NULL)
39 extern void rb_insert_color(struct rb_node *, struct rb_root *);
40 extern void rb_erase(struct rb_node *, struct rb_root *);
44 extern struct rb_node *rb_next(const struct rb_node *);
45 extern struct rb_node *rb_prev(const struct rb_node *);
46 extern struct rb_node *rb_first(const struct rb_root *);
47 extern struct rb_node *rb_last(const struct rb_root *);
50 extern struct rb_node *rb_first_postorder(const struct rb_root *);
51 extern struct rb_node *rb_next_postorder(const struct rb_node *);
54 extern void rb_replace_node(struct rb_node *victim, struct rb_node *new,
56 extern void rb_replace_node_rcu(struct rb_node *victim, struct rb_node *new,
59 static inline void rb_link_node(struct rb_node *node, struct rb_node *parent, in rb_link_node()
60 struct rb_node **rb_link) in rb_link_node()
68 static inline void rb_link_node_rcu(struct rb_node *node, struct rb_node *parent, in rb_link_node_rcu()
69 struct rb_node **rb_link) in rb_link_node_rcu()
108 static inline void rb_insert_color_cached(struct rb_node *node, in rb_insert_color_cached()
118 static inline struct rb_node *
119 rb_erase_cached(struct rb_node *node, struct rb_root_cached *root) in rb_erase_cached()
121 struct rb_node *leftmost = NULL; in rb_erase_cached()
131 static inline void rb_replace_node_cached(struct rb_node *victim, in rb_replace_node_cached()
132 struct rb_node *new, in rb_replace_node_cached()
164 static __always_inline struct rb_node *
165 rb_add_cached(struct rb_node *node, struct rb_root_cached *tree, in rb_add_cached()
166 bool (*less)(struct rb_node *, const struct rb_node *)) in rb_add_cached() argument
168 struct rb_node **link = &tree->rb_root.rb_node; in rb_add_cached()
169 struct rb_node *parent = NULL; in rb_add_cached()
195 rb_add(struct rb_node *node, struct rb_root *tree, in rb_add()
196 bool (*less)(struct rb_node *, const struct rb_node *)) in rb_add() argument
198 struct rb_node **link = &tree->rb_node; in rb_add()
199 struct rb_node *parent = NULL; in rb_add()
222 static __always_inline struct rb_node *
223 rb_find_add(struct rb_node *node, struct rb_root *tree, in rb_find_add()
224 int (*cmp)(struct rb_node *, const struct rb_node *)) in rb_find_add() argument
226 struct rb_node **link = &tree->rb_node; in rb_find_add()
227 struct rb_node *parent = NULL; in rb_find_add()
255 static __always_inline struct rb_node *
257 int (*cmp)(const void *key, const struct rb_node *)) in rb_find() argument
259 struct rb_node *node = tree->rb_node; in rb_find()
283 static __always_inline struct rb_node *
285 int (*cmp)(const void *key, const struct rb_node *)) in rb_find_first() argument
287 struct rb_node *node = tree->rb_node; in rb_find_first()
288 struct rb_node *match = NULL; in rb_find_first()
313 static __always_inline struct rb_node *
314 rb_next_match(const void *key, struct rb_node *node, in rb_next_match()
315 int (*cmp)(const void *key, const struct rb_node *)) in rb_next_match() argument