__radix_tree_replace(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– __radix_tree_replace(9) πŸ’–

okay so bestie, this is a page from the Kernel API Manual, and it's all about __radix_tree_replace β€” yes, the double-underscore one. main character energy, honestly. ✨

🌸 NAME 🌸

__radix_tree_replace β€” replace item in a slot. that's it, that's the job πŸ’…

✨ SYNOPSIS ✨

void __radix_tree_replace (struct radix_tree_root *root , struct
       radix_tree_node *node , void __rcu **slot , void *item );

πŸŽ€ ARGUMENTS πŸŽ€

  • root β€” radix tree root 🌳
  • node β€” pointer to tree node
  • slot β€” pointer to slot in node
  • item β€” new item to store in the slot. πŸ’–

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so this one is for use with __radix_tree_lookup. The caller must hold tree write locked across slot lookup and replacement. not optional, bestie β€” hold that write lock across the lookup and the replacement, no gaps. periodt. πŸ”₯

πŸ’œ SEE ALSO πŸ’œ

Kernel file ./lib/radix-tree.c β€” and the whole friend group is here:


mwah πŸ’‹ source/version ./lib, dated October 2026, on the __radix_tree_replace(9) page. byeee 🫢

πŸ“¦ where this page comes from