rb_find_add_rcu(9)
β¨ rb_find_add_rcu β the kernel API manual, bestie edition β¨
Okay so bestie, gather round, because we're talking about rb_find_add_rcu from the Kernel API Manual and honestly? It's giving efficient. π
πΈ NAME πΈ
rb_find_add_rcu β find the equivalent @node in @tree, or add @node π«Ά
π SYNOPSIS π
struct rb_node * rb_find_add_rcu (struct rb_node *node , struct rb_root
*tree , int (*cmp)(struct rb_node *, const struct rb_node *) );
π¦ ARGUMENTS π¦
nodeβ the node to look-for / insert β¨ literally both jobs, she's versatiletreeβ the tree to search / modify π³ search first, modify if needed, main character energycmpβ the operator defining the node order π§ this is the vibe check that decides who goes where
π DESCRIPTION π
So what does it do? It adds a Store-Release for link_node. No cap. π₯
It returns the rb_node matching node, or NULL when no match is found and node is inserted. So like, either you get your match back, or you get NULL and she's already been slotted into the tree. Periodt. π
π SEE ALSO π
- Kernel file
./include/linux/rbtree.hβ rbtree_postorder_for_each_entry_safe(9)rb_add_cached(9)rb_add_linked(9)rb_add(9)rb_find_add_cached(9)rb_find_add(9)rb_find(9)rb_find_rcu(9)rb_find_first(9)rb_next_match(9)rb_for_each(9)
π That's the whole page, bestie β every flag, every argument, every reference, all intact. Go forth and rbtree responsibly. π
Mwah π β this page lives under ./include/linux, dropped October 2026, and that's the tea. See you in the next manpage, babe! πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms