latch_tree_erase(9)
π NAME
latch_tree_erase β ok so bestie, this one removes @node from the trees @root β¨ (yes the tree*s*, plural, we'll get to that, it's giving very main character energy π)
This is the latch_tree_erase(9) page from the Kernel API Manual, and honestly? She ate. Let's go π«Ά
β¨ SYNOPSIS
void latch_tree_erase (struct latch_tree_node *node , struct
latch_tree_root *root , const struct latch_tree_ops *ops );
Three args, no return value, no notes. She's void, she's confident, she's literally iconic π
π ARGUMENTS
nodeβ thenodes to remoteπ« (that's the page's exact wording, I'm not gonna gaslight you β it means the node you're getting rid of, bestie). One node in, no node out πrootβ thetrees to remove node fromπ³π³ yes, trees, plural, keep reading.opsβ the operators that define the node ordering. She's the vibe check for where things land π
π¦ DESCRIPTION
So this removes the node from the trees in root, and it does it in an ordered fashion β the whole point being that we can always observe one complete tree πβ¨ No half-deleted cursed in-between state, no "not me mid-erase" energy, periodt. And if you want the full lore on why that matters, see the comment for write_seqcount_latch_begin π
β οΈ Two big assumptions, do not skip these, I'm serious π One: it is assumed thatnodewill observe one RCU quiescent state before being reused of freed (that's the original wording β "of freed", she's doing her best π₯² you know what it means). Two: all modifications (latch_tree_insert,latch_tree_remove) are assumed to be serialized. Like, one at a time, take turns, be polite β no chaotic group-chat overlap π
πΈ SEE ALSO
- Kernel file
./include/linux/rbtree_latch.hβ that's where the whole latch tree family lives π - struct
latch_tree_ops(9)β the ordering operators from the arguments π latch_tree_insert(9)β her sister, the one who puts things in βlatch_tree_find(9)β her other sister, the one who finds things π
Ok that's the whole page, you're caught up π§π Sourced from the ./include/linux directory, dated October 2026, under the latch_tree_erase(9) name β mwah, go read write_seqcount_latch_begin's comment, iykyk ππ
π¦ 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