Lines Matching full: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, in rb_add_cached() argument
168 struct rb_node **link = &tree->rb_root.rb_node; in rb_add_cached()
183 rb_insert_color_cached(node, tree, leftmost); in rb_add_cached()
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, in rb_add() argument
198 struct rb_node **link = &tree->rb_node; in rb_add()
210 rb_insert_color(node, tree); in rb_add()
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, in rb_find_add() argument
226 struct rb_node **link = &tree->rb_node; in rb_find_add()
243 rb_insert_color(node, tree); in rb_find_add()
248 * rb_find_add_rcu() - find equivalent @node in @tree, or add @node
250 * @tree: tree to search / modify
259 rb_find_add_rcu(struct rb_node *node, struct rb_root *tree, in rb_find_add_rcu() argument
262 struct rb_node **link = &tree->rb_node; in rb_find_add_rcu()
279 rb_insert_color(node, tree); in rb_find_add_rcu()
284 * rb_find() - find @key in tree @tree
286 * @tree: tree to search
292 rb_find(const void *key, const struct rb_root *tree, in rb_find() argument
295 struct rb_node *node = tree->rb_node; in rb_find()
312 * rb_find_rcu() - find @key in tree @tree
314 * @tree: tree to search
317 * Notably, tree descent vs concurrent tree rotations is unsound and can result
323 rb_find_rcu(const void *key, const struct rb_root *tree, in rb_find_rcu() argument
326 struct rb_node *node = tree->rb_node; in rb_find_rcu()
343 * rb_find_first() - find the first @key in @tree
345 * @tree: tree to search
351 rb_find_first(const void *key, const struct rb_root *tree, in rb_find_first() argument
354 struct rb_node *node = tree->rb_node; in rb_find_first()
373 * rb_next_match() - find the next @key in @tree
375 * @tree: tree to search
394 * @tree: tree to search
397 #define rb_for_each(node, key, tree, cmp) \ argument
398 for ((node) = rb_find_first((key), (tree), (cmp)); \