list_private...from_reverse(9)
π
list_private_for_each_entry_from_reverse β like, the manual page for it (section 9, Kernel API Manual, bestie)
okay so picture this: you're in the kernel, you've got a private list, and you need to walk it backwards starting from wherever you're standing right now. that's it. that's the whole vibe. this is the macro for that. welcome π«Ά
β¨ NAME β¨
list_private_for_each_entry_from_reverse β iterate backwards over list of given type from the current point
like, you go backwards, over a list, of a given type, and you start from the current point. no cap, that's literally the description. π¦
πΈ SYNOPSIS πΈ
list_private_for_each_entry_from_reverse (pos , head , member );
(yeah the spacing is a little unhinged, that's just how it's written, leave it alone π)
π ARGUMENTS π
posβ the type * to use as a loop cursor. she's your main character pointer, she's the one moving through the list every iteration πheadβ the head for your list. the anchor. the home base. the girlboss at the top of the whole thing πmemberβ the name of thelist_headwithin the struct. so like, the name of the field inside your struct that's the list node. you gotta tell her which one it is, she's not a mind reader π
π₯ DESCRIPTION π₯
Iterate backwards over list of given type, continuing from current position.
that's the whole tea. you're mid-list or wherever, and instead of restarting from the top like a coward, you keep going in the reverse direction from exactly where you are. it's giving "I know where I'm going and I'm not backtracking" energy. slay β¨
fr fr, it's the from version β so pos isn't reset for you, you're continuing from the current position. don't come for me if you expected a fresh start, that's a different macro's job π
π SEE ALSO π
- Kernel file
./include/linux/list_private.hβ and honestly the whole family lives there, go say hi π§ Private List Primitives(9)list_private_entry(9)list_private_first_entry(9)list_private_last_entry(9)list_private_next_entry(9)list_private_next_entry_circular(9)list_private_prev_entry(9)list_private_prev_entry_circular(9)list_private_entry_is_head(9)list_private_for_each_entry(9)list_private_for_each_entry_reverse(9)list_private_for_each_entry_continue(9)list_private_for_each_entry_continue_reverse(9)list_private_for_each_entry_from(9)list_private_for_each_entry_safe(9)list_private_for_each_entry_safe_continue(9)list_private_for_each_entry_safe_from(9)list_private_for_each_entry_safe_reverse(9)list_private_safe_reset_next(9)
π that's the whole page bestie, go iterate responsibly. she lives in ./include/linux, she's dated October 2026, and she's part of the Kernel API Manual (section 9, iykyk). mwah. ππ
π¦ 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