hlist_nulls_add_tail_rcu(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… hlist_nulls_add_tail_rcu(9) πŸ’…

okay so this is a page from the Kernel API Manual and honestly it's short but it's mighty β€” we're talking about hlist_nulls_add_tail_rcu, bestie. buckle up πŸŽ€


✨ NAME ✨

hlist_nulls_add_tail_rcu β€” and that's it, that's the whole description. the original literally leaves it blank 😭 which is giving "the function name IS the description" energy. iconic of it, honestly.


🌸 SYNOPSIS 🌸

void hlist_nulls_add_tail_rcu (struct hlist_nulls_node *n , struct
hlist_nulls_head *h );

that's the whole signature, no cap β€” void return, two pointers, one vibe. πŸ¦‹


πŸ’– ARGUMENTS πŸ’–

  • n β€” the element you're adding to the hash list. this is the little guy going in 🫢
  • h β€” the list you're adding it to. this is the destination, the main character energy list itself πŸ‘‘

πŸ”₯ DESCRIPTION πŸ”₯

so what does it do? it adds the specified element to the specified hlist_nulls, while permitting racing traversals. yes, "racing traversals" β€” it's giving multitasking queen 🏎️✨

now here's the important part, bestie, listen up πŸ™ˆ: the caller must take whatever precautions are necessary (such as holding appropriate locks) to avoid racing with another list-mutation primitive β€” things like hlist_nulls_add_head_rcu or hlist_nulls_del_rcu β€” running on this same list. like, that's on you, not on the function. do not @ me.

however β€” and this is the slay part β€” it is perfectly legal to run concurrently with the _rcu list-traversal primitives, such as hlist_nulls_for_each_entry_rcu, which exist to prevent memory-consistency problems on Alpha CPUs. yes, those Alpha CPUs. they know what they did πŸ’€

and regardless of the type of CPU β€” Alpha or not, bestie β€” the list-traversal primitive must be guarded by rcu_read_lock. no exceptions, periodt. πŸ”’

⚠️ quick vibe check: mutation β‰  traversal. your other mutation primitives need locks because they can race with you. your _rcu traversals are chill to run alongside you, but they gotta be wrapped in rcu_read_lock. don't mix these up or it's gonna be a bad time 😭

🌈 SEE ALSO 🌈

the whole nulls-rcu friend group, all here, all invited to the group chat πŸ«ΆπŸ’œ


🧚 sign-off 🧚

this absolute banger lives in ./include/linux, dated October 2026, and yes the footer still says hlist_nulls_add_tail_rcu(9) because it knows exactly who it is πŸ’…βœ¨

go forth and add things to the tail, bestie β€” with locks, and with love. πŸŽ€β­

πŸ“¦ where this page comes from