Lines Matching full:tree
52 /* Find logical next and previous nodes in a tree */
95 * rb_erase() may rebalance the tree, causing us to miss some nodes.
172 * rb_add_cached() - insert @node into the leftmost cached tree @tree
174 * @tree: leftmost cached tree to insert @node into
178 rb_add_cached(struct rb_node *node, struct rb_root_cached *tree, in rb_add_cached() argument
181 struct rb_node **link = &tree->rb_root.rb_node; in rb_add_cached()
196 rb_insert_color_cached(node, tree, leftmost); in rb_add_cached()
200 * rb_add() - insert @node into @tree
202 * @tree: tree to insert @node into
206 rb_add(struct rb_node *node, struct rb_root *tree, in rb_add() argument
209 struct rb_node **link = &tree->rb_node; in rb_add()
221 rb_insert_color(node, tree); in rb_add()
225 * rb_find_add() - find equivalent @node in @tree, or add @node
227 * @tree: tree to search / modify
234 rb_find_add(struct rb_node *node, struct rb_root *tree, in rb_find_add() argument
237 struct rb_node **link = &tree->rb_node; in rb_find_add()
254 rb_insert_color(node, tree); in rb_find_add()
259 * rb_find() - find @key in tree @tree
261 * @tree: tree to search
267 rb_find(const void *key, const struct rb_root *tree, in rb_find() argument
270 struct rb_node *node = tree->rb_node; in rb_find()
287 * rb_find_first() - find the first @key in @tree
289 * @tree: tree to search
295 rb_find_first(const void *key, const struct rb_root *tree, in rb_find_first() argument
298 struct rb_node *node = tree->rb_node; in rb_find_first()
317 * rb_next_match() - find the next @key in @tree
319 * @tree: tree to search
338 * @tree: tree to search
341 #define rb_for_each(node, key, tree, cmp) \ argument
342 for ((node) = rb_find_first((key), (tree), (cmp)); \