hlist_nulls_replace_rcu(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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


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