radix_tree_delete(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… radix_tree_delete πŸ’…

ok so this is from the Kernel API Manual, bestie β€” section 9, the kernel developer pages. and today's main character is radix_tree_delete, and honestly? she's a mood. she removes stuff. that's her whole thing. πŸŽ€


✨ NAME ✨

radix_tree_delete β€” delete an entry from a radix tree, no cap


🌸 SYNOPSIS 🌸

void * radix_tree_delete (struct radix_tree_root *root , unsigned long
index );

like literally that's it. void * in, void * out. she gives back what she takes. πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • root β€” radix tree root. this is, like, the tree's home base. the root of all roots. the main character of the data structure, honestly. 🌳
  • index β€” index key. it's the key you're pointing at β€” the specific little spot in the tree you want to yeet an entry out of. πŸ”‘

🌈 DESCRIPTION 🌈

ok so here's the tea, bestie: this function removes the entry at index from the radix tree rooted at root. that's it. that's the whole plot. she finds the entry sitting at that index and she deletes it. gone. not me crying over a removed entry 😭

no extra steps, no drama, no side quests β€” the description is genuinely just "remove the entry at index from the radix tree rooted at root" and honestly? iconic. lowkey love a function that knows exactly what it is. πŸ‘‘


⭐ RETURN ⭐

she returns the deleted entry β€” like, the actual thing you just took out of the tree, hand-delivered back to you, so you can do whatever with it. 🫢

or, if it wasn't there in the first place, you get NULL. and yes that's NULL with the full capital letters, the truth, the whole truth, nothing but the truth. so like β€” vibe check your return value before you dereference it, fr fr. πŸ’€


🧚 SEE ALSO 🧚

first up, the kernel file itself:

  • ./lib/radix-tree.c

and then the whole extended friendship group of radix tree and IDR buddies, all here, all present, all accounted for, no one left behind (unlike the entry you just deleted πŸ™ˆ):


ok quick heads up 🫢 β€” this page is from ./lib and the date on it is October 2026. yes, 2026. she's future-coded. time traveler behavior. ⏰✨

and that's the whole page, bestie β€” go forth and delete responsibly. mwah πŸ’–πŸŒΈ

πŸ“¦ where this page comes from