Lines Matching defs:rb_node
41 struct rb_node {
52 struct rb_node *left;
55 struct rb_node *right;
59 static inline struct rb_node *
60 rb_node_parent(struct rb_node *n)
62 return (struct rb_node *)(n->parent & ~(uintptr_t)1);
71 struct rb_node *root;
88 * \param node A pointer to a rb_node
90 * \param field The rb_node field in the containing data structure
111 void rb_tree_insert_at(struct rb_tree *T, struct rb_node *parent,
112 struct rb_node *node, bool insert_left);
123 rb_tree_insert(struct rb_tree *T, struct rb_node *node,
124 int (*cmp)(const struct rb_node *, const struct rb_node *))
129 struct rb_node *y = NULL;
130 struct rb_node *x = T->root;
150 void rb_tree_remove(struct rb_tree *T, struct rb_node *z);
163 static inline struct rb_node *
165 int (*cmp)(const struct rb_node *, const void *))
170 struct rb_node *x = T->root;
199 static inline struct rb_node *
201 int (*cmp)(const struct rb_node *, const void *))
206 struct rb_node *y = NULL;
207 struct rb_node *x = T->root;
223 struct rb_node *rb_tree_first(struct rb_tree *T);
226 struct rb_node *rb_tree_last(struct rb_tree *T);
229 struct rb_node *rb_node_next(struct rb_node *node);
232 struct rb_node *rb_node_prev(struct rb_node *node);
246 * \param field The rb_node field in containing data structure
251 (iter = rb_node_data(type, (struct rb_node *)__node, field), true); \
252 __node = (type *)rb_node_next((struct rb_node *)__node))
263 * \param field The rb_node field in containing data structure
268 *__next = (type *)rb_node_next_or_null((struct rb_node *)__node); \
270 (iter = rb_node_data(type, (struct rb_node *)__node, field), true); \
272 __next = (type *)rb_node_next_or_null((struct rb_node *)__node))
283 * \param field The rb_node field in containing data structure
288 (iter = rb_node_data(type, (struct rb_node *)__node, field), true); \
289 __node = (type *)rb_node_prev((struct rb_node *)__node))
300 * \param field The rb_node field in containing data structure
305 *__prev = (type *)rb_node_prev_or_null((struct rb_node *)__node); \
307 (iter = rb_node_data(type, (struct rb_node *)__node, field), true); \
309 __prev = (type *)rb_node_prev_or_null((struct rb_node *)__node))