radix_tree_tag_set(9)
π radix_tree_tag_set(9) β a kernel API manual moment
okay bestie, welcome to radix_tree_tag_set(9) from the Kernel API Manual. yes, the whole manual. buckle up π
β¨ NAME β¨
radix_tree_tag_set β set a tag on a radix tree node. that's it. that's the whole vibe check π¦
πΈ SYNOPSIS πΈ
void * radix_tree_tag_set (struct radix_tree_root *root , unsigned long
index , unsigned int tag );
literally just copy-paste that and you're in business, no cap π
π ARGUMENTS π
rootβ the radix tree root. the main character of the operation, the place where it all begins πindexβ the index key. this is which spot in the tree we're talking about, iykyk πtagβ the tag index. the little label we're sticking on there π·οΈ
π DESCRIPTION π
so here's the tea: this sets the search tag corresponding to index in the radix tree. and bestie, it doesn't stop halfway β it does it from the root all the way down to the leaf node. the whole path. obsessed with the commitment fr fr π
the tag you pass must be < RADIX_TREE_MAX_TAGS. that's a hard requirement, not a suggestion, so pls respect it π
it returns the address of the tagged item. so you get something back β slay β¨
ok but real talk: setting a tag on a not-present item is a bug. like, not a "haha oops" bug, an actual bug. do not do it. consider this your warning π¨
π₯ SEE ALSO π₯
the kernel file ./lib/radix-tree.c is where all the magic lives, and here's the whole friend group π
radix_tree_find_next_bit(9)radix_tree_shrink(9)__radix_tree_create(9)radix_tree_insert(9)__radix_tree_lookup(9)radix_tree_lookup_slot(9)radix_tree_lookup(9)__radix_tree_replace(9)radix_tree_replace_slot(9)radix_tree_iter_replace(9)radix_tree_tag_clear(9)radix_tree_iter_tag_clear(9)radix_tree_tag_get(9)radix_tree_next_chunk(9)radix_tree_gang_lookup(9)radix_tree_gang_lookup_tag(9)radix_tree_gang_lookup_tag_slot(9)radix_tree_iter_delete(9)radix_tree_delete_item(9)radix_tree_delete(9)radix_tree_tagged(9)idr_preload(9)idr_destroy(9)
and that's the whole page, bestie!! mwah π this one's brought to you by ./lib and dated October 2026 β write it in your calendar, screenshot it, frame it, whatever π«Ά π
π
π¦ 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