hash_add_rcu(9)
π hash_add_rcu(9)
okay so bestie, welcome to the Kernel API Manual β¨ β this one's a little function with main character energy, and it lives in ./include/linux/hashtable.h, iykyk. Let's get into it π
β¨ NAME β¨
hash_add_rcu β literally just add an object to a rcu enabled hashtable π¦ that's the whole vibe.
πΈ SYNOPSIS πΈ
hash_add_rcu (hashtable , node , key );
no cap, that's it. three things go in, and the hashtable gets a new resident π«Ά
π ARGUMENTS π
hashtableβ the hashtable you're adding to π the one that's about to get a whole new member.nodeβ thestruct hlist_nodeof the object being added π like, the actual little hook on the object itself, not the object, bestie, the node.keyβ the key of the object being added π yes queen, the key. that's how it finds its spot.
π¦ SEE ALSO π¦
- Kernel file
./include/linux/hashtable.h hash_init(9)hash_add(9)hash_hashed(9)hash_empty(9)hash_del(9)hash_del_rcu(9)hash_for_each(9)hash_for_each_rcu(9)hash_for_each_safe(9)hash_for_each_possible(9)hash_for_each_possible_rcu(9)hash_for_each_possible_rcu_notrace(9)hash_for_each_possible_safe(9)
the whole hashtable friend group fr fr, go say hi to all of them π
ngl the whole family is listed up there, so if hash_add_rcu isn't quite the vibe you were going for, one of its cousins 100% is π§
and that's the page, bestie!! π from the ./include/linux girlies, dated October 2026 β stay slay, stay rcu-safe, and remember: every hashtable deserves its moment π
β¨π
π¦ 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