genradix_iter_peek_prev(9)
πΈ NAME πΈ
genradix_iter_peek_prev β ok so this one gets you the first entry at or below the iterator's current position π (yes, below, it walks backwards bestie, reverse slay β¨)
This is a page from the Kernel API Manual, btw β we're in kernel-land now π§
β¨ SYNOPSIS β¨
genradix_iter_peek_prev (_iter , _radix );
periodt. that's the whole call. look at her go π«Ά
π ARGUMENTS π
_iterβ agenradix_iter, aka the iterator bestie doing the walking. she's already got a current position and she knows it πββοΈ_radixβ the genradix being iterated over. like, the actual tree-thing you're strolling through π³
π DESCRIPTION π
Ok so here's the tea β: if no more entries exist at or below _iter's current position, this thing returns NULL. That's it. That's the whole vibe.
So like β you're poking backwards through your entries, and when there's literally nothing left down there, you get NULL back π not an error, not a crash, just a very polite "nope, we're done here, nothing below" π¦
ngl bestie, always check for that NULL before you go dereferencing it π that's not a vibe check you want to fail.
π SEE ALSO π
- Kernel file
./include/linux/generic-radix-tree.hβ Generic radix trees/sparse arrays(9) π genradix_init(9)genradix_free(9)genradix_ptr(9)genradix_ptr_alloc(9)genradix_iter_init(9)genradix_iter_peek(9)genradix_for_each(9)genradix_for_each_reverse(9)genradix_prealloc(9)
the whole friend group fr fr π«Ά go read them, they ate π₯
mwah π this page lives in ./include/linux, stamped October 2026, and yes β the header still says genradix_iter_peek_prev(9) because she's the main character πβ¨
π¦ 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