STRUCT RADIX_TREE_ITER(9)
β¨ struct radix_tree_iter π
okay so bestie, welcome to the struct radix_tree_iter page β it's a kernel API manual situation, and this struct is literally the it-girl of radix tree iteration state π
πΈ NAME πΈ
struct radix_tree_iter β radix tree iterator state. that's it, that's the vibe π
β¨ SYNOPSIS β¨
struct radix_tree_iter {
unsigned long index;
unsigned long next_index;
unsigned long tags;
struct radix_tree_node *node;
};
π¦ Members π¦
indexβ index of current slot. the now. the main character slot π«next_indexβ one beyond the last index for this chunk. like, "one past the end", classic π₯tagsβ bit-mask for tag-iterating. yep, a whole mask just for tags πnodeβ node that contains current slot. it's giving "where the slot actually lives" π
π§ Description π§
okay so the way this works: this radix tree iterator thinks in terms of "chunks" of slots, no cap. a chunk is a subinterval of slots that lives inside one radix tree leaf node πΏ
each chunk gets described by two things: a pointer to its first slot, and a struct radix_tree_iter that holds the chunk's position in the tree and its size. two-for-one deal, we love to see it π«Ά
and for the tagged iteration girlies? radix_tree_iter also holds the slots' bit-mask for one chosen radix tree tag β that's the whole point of the tags member.
π SEE ALSO π
kernel file ./include/linux/radix-tree.h
- Radix-tree synchronization(9)
radix_tree_deref_slot(9)radix_tree_deref_slot_protected(9)radix_tree_deref_retry(9)radix_tree_exception(9)radix_tree_iter_init(9)radix_tree_next_chunk(9)radix_tree_iter_lookup(9)radix_tree_iter_retry(9)radix_tree_iter_resume(9)radix_tree_chunk_size(9)radix_tree_next_slot(9)radix_tree_for_each_slot(9)radix_tree_for_each_tagged(9)
like, go read those next, iykyk π
lowkey tho β this whole page is from the ./include/linux source, version dated October 2026 β so yeah, that's the era we're in, bestie. anyway ily, go iterate those chunks, slay ππ¦β¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms