list_replace_rcu(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ NAME πŸŽ€

okay so bestie, welcome to list_replace_rcu(9) from the Kernel API Manual β€” this one is literally about replacing an old entry with a new one. slay.


✨ SYNOPSIS ✨

void list_replace_rcu (struct list_head *old , struct list_head *new );

🫢 ARGUMENTS 🫢

  • old β€” the element to be replaced. she’s getting swapped out, periodt.
  • new β€” the new element to insert. main character incoming πŸ’…

πŸ’– DESCRIPTION πŸ’–

so here’s the tea: the old entry gets replaced with the new entry atomically from the perspective of concurrent readers ✨. like, readers see the swap as one clean little moment.

and if there are concurrent updaters in the mix? synchronizing with them is the caller’s responsibility, fr fr. that part is on you, not the function. πŸ‘‘


🚨 NOTE 🚨

old should not be empty. that’s the note. do not skip the vibe check, bestie.


πŸ‘€ SEE ALSO πŸ‘€

Kernel file: ./include/linux/rculist.h


byeee β€” this list_replace_rcu(9) page is sourced from ./include/linux and stamped October 2026. go replace responsibly πŸ’–πŸ¦‹

πŸ“¦ where this page comes from