hlist_add_tail_rcu(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… hlist_add_tail_rcu(9) β€” Kernel API Manual, but make it group chat πŸ’…

okay so bestie, welcome to the hlist_add_tail_rcu(9) page from the Kernel API Manual ✨ this one is short but it has lore, and we are keeping every single detail, no cap 🫢


πŸŽ€ NAME πŸŽ€

hlist_add_tail_rcu β€” that's literally the whole name line, bestie; the original leaves the description after the dash blank 😭 iconic minimalist behavior πŸ’€


✨ SYNOPSIS ✨

void hlist_add_tail_rcu (struct hlist_node *n , struct hlist_head *h );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • n β€” the element to add to the hash list. 🫢
  • h β€” the list to add to. πŸ’–

πŸ”₯ DESCRIPTION πŸ”₯

okay so this function adds the specified element to the specified hlist, while permitting racing traversals. periodt ✨

here's the serious bit, bestie 🚨 the caller must take whatever precautions are necessary (such as holding appropriate locks) to avoid racing with another list-mutation primitive, such as hlist_add_head_rcu or hlist_del_rcu, running on this same list.

however, it is perfectly legal to run concurrently with the _rcu list-traversal primitives, such as hlist_for_each_entry_rcu, used to prevent memory-consistency problems on Alpha CPUs. 🌈

and regardless of the type of CPU, the list-traversal primitive must be guarded by rcu_read_lock. πŸ”’

not me reminding you that lock discipline is the main character here πŸ’…

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./include/linux/rculist.h β€” and the whole reference squad is: list_for_each_rcu(9), list_tail_rcu(9), list_add_rcu(9), list_add_tail_rcu(9), list_del_rcu(9), list_bidir_del_rcu(9), hlist_del_init_rcu(9), list_replace_rcu(9), list_splice_rcu(9), __list_splice_init_rcu(9), list_splice_init_rcu(9), list_splice_tail_init_rcu(9), list_entry_rcu(9), list_first_or_null_rcu(9), list_next_or_null_rcu(9), list_for_each_entry_rcu(9), list_for_each_entry_srcu(9), list_entry_lockless(9), list_for_each_entry_lockless(9), list_for_each_entry_continue_rcu(9), list_for_each_entry_from_rcu(9), hlist_del_rcu(9), hlist_replace_rcu(9), hlists_swap_heads_rcu(9), hlist_add_head_rcu(9), hlist_add_before_rcu(9), hlist_add_behind_rcu(9), hlist_for_each_entry_rcu(9), hlist_for_each_entry_srcu(9), hlist_for_each_entry_rcu_notrace(9), hlist_for_each_entry_rcu_bh(9), hlist_for_each_entry_continue_rcu(9), hlist_for_each_entry_continue_rcu_bh(9), hlist_for_each_entry_from_rcu(9) πŸ’–


okay that's the page, bestie! source/version: ./include/linux; date: October 2026; and the page itself is hlist_add_tail_rcu(9) β€” bye bestie, go guard that traversal with rcu_read_lock πŸ’…βœ¨

πŸ“¦ where this page comes from