Lines Matching defs:tree
43 /* Find logical next and previous nodes in a tree */
97 * rb_erase() may rebalance the tree, causing us to miss some nodes.
157 * rb_add_cached() - insert @node into the leftmost cached tree @tree
159 * @tree: leftmost cached tree to insert @node into
165 rb_add_cached(struct rb_node *node, struct rb_root_cached *tree,
168 struct rb_node **link = &tree->rb_root.rb_node;
183 rb_insert_color_cached(node, tree, leftmost);
189 * rb_add() - insert @node into @tree
191 * @tree: tree to insert @node into
195 rb_add(struct rb_node *node, struct rb_root *tree,
198 struct rb_node **link = &tree->rb_node;
210 rb_insert_color(node, tree);
214 * rb_find_add() - find equivalent @node in @tree, or add @node
216 * @tree: tree to search / modify
223 rb_find_add(struct rb_node *node, struct rb_root *tree,
226 struct rb_node **link = &tree->rb_node;
243 rb_insert_color(node, tree);
248 * rb_find() - find @key in tree @tree
250 * @tree: tree to search
256 rb_find(const void *key, const struct rb_root *tree,
259 struct rb_node *node = tree->rb_node;
276 * rb_find_first() - find the first @key in @tree
278 * @tree: tree to search
284 rb_find_first(const void *key, const struct rb_root *tree,
287 struct rb_node *node = tree->rb_node;
306 * rb_next_match() - find the next @key in @tree
308 * @tree: tree to search
327 * @tree: tree to search
330 #define rb_for_each(node, key, tree, cmp) \
331 for ((node) = rb_find_first((key), (tree), (cmp)); \