Lines Matching refs:tree
117 struct rbnode *z_rb_get_minmax(struct rbtree *tree, uint8_t side);
122 void rb_insert(struct rbtree *tree, struct rbnode *node);
127 void rb_remove(struct rbtree *tree, struct rbnode *node);
132 static inline struct rbnode *rb_get_min(struct rbtree *tree) in rb_get_min() argument
134 return z_rb_get_minmax(tree, 0U); in rb_get_min()
140 static inline struct rbnode *rb_get_max(struct rbtree *tree) in rb_get_max() argument
142 return z_rb_get_minmax(tree, 1U); in rb_get_max()
154 bool rb_contains(struct rbtree *tree, struct rbnode *node);
165 static inline void rb_walk(struct rbtree *tree, rb_visit_t visit_fn, in rb_walk() argument
168 z_rb_walk(tree->root, visit_fn, cookie); in rb_walk()
179 #define _RB_FOREACH_INIT(tree, node) { \ argument
180 .stack = &(tree)->iter_stack[0], \
181 .is_left = &(tree)->iter_left[0], \
185 #define _RB_FOREACH_INIT(tree, node) { \ argument
187 alloca((tree)->max_depth * sizeof(struct rbnode *)), \
188 .is_left = (uint8_t *)alloca((tree)->max_depth * sizeof(uint8_t)),\
193 struct rbnode *z_rb_foreach_next(struct rbtree *tree, struct _rb_foreach *f);
216 #define RB_FOR_EACH(tree, node) \ argument
217 for (struct _rb_foreach __f = _RB_FOREACH_INIT(tree, node); \
218 ((node) = z_rb_foreach_next((tree), &__f)); \
231 #define RB_FOR_EACH_CONTAINER(tree, node, field) \ argument
232 for (struct _rb_foreach __f = _RB_FOREACH_INIT(tree, node); \
233 ({struct rbnode *n = z_rb_foreach_next(tree, &__f); \