radix_tree_iter_delete(9)
β¨ radix_tree_iter_delete(9) β¨
okay so this is radix_tree_iter_delete from the Kernel API Manual, and bestie, it does exactly one thing and it does it slayfully: it deletes the entry sitting at your iterator's current position. that's it. that's the whole vibe. π
π NAME π
radix_tree_iter_delete β delete the entry at this iterator position ποΈβ¨
π¦ SYNOPSIS π¦
void radix_tree_iter_delete (struct radix_tree_root *root , struct
radix_tree_iter *iter , void __rcu **slot );
like, that's the whole signature, no cap. three args, void return, nothing returned to you except a slightly emptier radix tree. π
πΈ ARGUMENTS πΈ
rootβ the radix tree root π³ like, which tree are we messing with? this one.iterβ the iterator state π§ it's the little guy keeping track of where you are.slotβ pointer to slot π it's avoid __rcu **, so mind your RCU manners, bestie.
π₯ DESCRIPTION π₯
okay so here's the tea β β this function deletes the entry at the position that the iterator is currently pointing at. poof. gone. iconic behavior honestly.
and here's the part you actually need to know: this may result in the current node being freed π like, the node can genuinely get deallocated out from under you. but !!! the glow-up is that if that happens, the iterator is advanced so it will not reference the freed memory π«Ά so the iterator keeps itself safe, main character energy fr fr.
also, ngl, this function may be called without any locking β but ONLY if there are no other threads which can access this tree. read that again, bestie. no other threads. zero. if anybody else can touch this tree, you're gonna have a bad time ππ
β οΈ seriously though: the no-locking thing is conditional. no other threads accessing the tree = you're free to rawdog it with no lock. otherwise? lock it up. π¨
π SEE ALSO π
all the sibling functions, in the exact order the kernel gave them, because we do not reorder the homies π
- Kernel file
./lib/radix-tree.c 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_set(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_delete_item(9)radix_tree_delete(9)radix_tree_tagged(9)idr_preload(9)idr_destroy(9)
and that's the page, babes π§π this one lives in ./lib and it's dated October 2026, filed under radix_tree_iter_delete(9) β go delete something responsibly, ily, bye π
β¨
π¦ 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