radix_tree_iter_resume(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… radix_tree_iter_resume(9) πŸ’…

okay so bestie, welcome to the Kernel API Manual β€” yes we're reading kernel docs together, this is our bonding era 🫢. Today's main character: radix_tree_iter_resume, and trust, she's lowkey iconic once you get what she's for.


✨ NAME ✨

radix_tree_iter_resume β€” resume iterating when the chunk may be invalid πŸ‘‘. That's the whole vibe. She picks your iteration back up when stuff might've gone sideways while you weren't looking.


🌸 SYNOPSIS 🌸

void __rcu ** radix_tree_iter_resume (void __rcu **slot , struct
       radix_tree_iter *iter );

like, yes, the return type has __rcu ** in it, we love a dramatic pointer-to-pointer moment πŸ’€.


πŸŽ€ ARGUMENTS πŸŽ€

  • slot β€” pointer to current slot. this is your spot, your little address in the tree, she knows where she is πŸ’–
  • iter β€” iterator state. the whole memory of the walk, all the state, the receipts, everything 🌸

⭐ RETURN ⭐

New slot pointer. that's it, that's the gift 🎁 β€” a fresh slot pointer handed right back to you.


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the situation, and it's giving "I need to let go of the lock but I'm scared" 😭.

If the iterator needs to release then reacquire a lock, the chunk may have been invalidated by an insertion or deletion in the meantime. like, you let go for one sec and the tree said "new phone who dis" and rearranged itself πŸ’€.

So: call this function before releasing the lock, and it'll continue the iteration from the next index. no cap, that's the whole move. lock drops, lock comes back, iteration carries on from the next index like nothing happened ✨.

fr fr do NOT skip the "before releasing the lock" part β€” that's the entire point of her existence πŸ’…

🌈 SEE ALSO 🌈


okay that's the whole page, you ate that πŸ“. this one lives over in ./include/linux, dated October 2026, and she answers to radix_tree_iter_resume(9) β€” mwah, see you in the next manpage bestie πŸ’œπŸ§š

πŸ“¦ where this page comes from