hlist_nulls_replace_rcu(9)
β¨ hlist_nulls_replace_rcu π
okay so bestie, this one is a kernel API manual page for hlist_nulls_replace_rcu β and yes, it's literally about swapping one entry for another in a RCU-protected hlist_nulls. No cap, it's a small function but the rules around it are everything. π
πΈ NAME πΈ
hlist_nulls_replace_rcu β replace an old entry by a new one π
π¦ SYNOPSIS π¦
void hlist_nulls_replace_rcu (struct hlist_nulls_node *old , struct
hlist_nulls_node *new );
β¨ ARGUMENTS β¨
oldβ the element to be replaced πnewβ the new element to insert, main character energy incoming π
π DESCRIPTION π
Replace the old entry with the new one in a RCU-protected hlist_nulls, while permitting racing traversals. πββοΈπ¨
Okay so the caller must take whatever precautions are necessary (such as holding 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. Do not skip this part, bestie. π
However, it is perfectly legal to run concurrently with the _rcu list-traversal primitives, such as hlist_nulls_for_each_entry_rcu. Slay. β¨
traduction du vibe: swapping stuff in? protect yourself from other mutators. Reading the list while someone swaps? that's totally fine, go off. π«Ά
π 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_head_rcu(9)hlist_nulls_add_tail_rcu(9)hlist_nulls_replace_init_rcu(9)hlist_nulls_for_each_entry_rcu(9)hlist_nulls_for_each_entry_safe(9)
okay that's the whole page, hope you're obsessed π this comes from ./include/linux and it's dated October 2026 β catch you in the kernel sources, bestie! π¦πΈπ«
π¦ 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