__radix_tree_lookup(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… __radix_tree_lookup(9) β€” the Kernel API Manual glow-up πŸ’…

okay bestie, welcome to the Kernel API Manual page for __radix_tree_lookup(9) β€” she's giving lookup-core, she's giving radix-tree realness, and we're gonna get through it together 🫢✨


🌸 NAME 🌸

__radix_tree_lookup β€” lookup an item in a radix tree πŸ’–


✨ SYNOPSIS ✨

void * __radix_tree_lookup (const struct radix_tree_root *root ,
unsigned long index , struct radix_tree_node **nodep , void __rcu
***slotp );

πŸŽ€ ARGUMENTS πŸŽ€

  • root β€” radix tree root πŸ‘‘
  • index β€” index key πŸ”‘
  • nodep β€” returns node πŸ“¦
  • slotp β€” returns slot πŸ•³οΈ

πŸ¦‹ DESCRIPTION πŸ¦‹

Lookup and return the item at position index in the radix tree root. Slay, that's the whole vibe ✨

But wait, there's a lil detail, and it's lowkey important: until there is more than one item in the tree, no nodes are allocated, and root->xa_head is used as a direct slot instead of pointing to a node β€” in which case *nodep will be NULL πŸ˜­πŸ’€


🌈 SEE ALSO 🌈

Kernel file ./lib/radix-tree.c β€” and honestly the whole radix-tree friend group showed up:


mwah πŸ’– this page came from ./lib, dated October 2026, and it's literally called __radix_tree_lookup(9) β€” periodt πŸŽ€βœ¨

πŸ“¦ where this page comes from