hlist_nulls_add_head_rcu(9)
okay so bestie, welcome to the hlist_nulls_add_head_rcu(9) page from the Kernel API Manual π
β¨ this one is short but it has receipts, so let's get into it.
πΈ NAME πΈ
hlist_nulls_add_head_rcu β
and that's literally it, bestie π the original NAME line is just that dash with nothing after it. no description, no extra lore, no cap.
π SYNOPSIS π
void hlist_nulls_add_head_rcu (struct hlist_nulls_node *n , struct hlist_nulls_head *h );
β¨ ARGUMENTS β¨
nβ the element you're adding to the hash list, bestie π«Άhβ the list you're adding it to π
π¦ DESCRIPTION π¦
okay so this function adds the specified element to the specified hlist_nulls, while still permitting racing traversals. iconic behavior, honestly β¨
the caller has to take whatever precautions are necessary β like holding the appropriate locks β to avoid racing with another list-mutation primitive, such as hlist_nulls_add_head_rcu or hlist_nulls_del_rcu, running on this same list. yes, that means you, bestie: protect your mutations π
however, it is perfectly legal to run concurrently with the _rcu list-traversal primitives, such as hlist_nulls_for_each_entry_rcu, which are used to prevent memory-consistency problems on Alpha CPUs. highkey important detail, don't skip it π
and regardless of the type of CPU, the list-traversal primitive must be guarded by rcu_read_lock. periodt. π₯
β οΈ caveat check: the mutation side needs proper precautions against other list mutations; the traversal side still needs rcu_read_lock, no matter the CPU. that's the whole vibe check.
π SEE ALSO π
- kernel file:
./include/linux/rculist_nulls.h hlist_nulls_del_init_rcu(9)hlist_nulls_first_rcu(9)hlist_nulls_next_rcu(9)hlist_nulls_pprev_rcu(9)hlist_nulls_del_rcu(9)hlist_nulls_add_tail_rcu(9)hlist_nulls_replace_rcu(9)hlist_nulls_replace_init_rcu(9)hlist_nulls_for_each_entry_rcu(9)hlist_nulls_for_each_entry_safe(9)
this lil page says it's from ./include/linux, dated October 2026, and it's the hlist_nulls_add_head_rcu(9) manual page β mwah ππ
π¦ 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