list_private...try_circular(9)
π list_private...try_circular(9) β the kernel API manual, bestie edition π
okay so first things first, the manual name is literally list_private...try_circular(9) (yes that's the truncated lil name up top, the real star of the show is list_private_prev_entry_circular and we'll get to her in a sec). this is kernel API manual territory, so put your hair up and let's go β¨
πΈ NAME πΈ
list_private_prev_entry_circular β get the prev element in list π
β SYNOPSIS β
list_private_prev_entry_circular (pos , head , member );
π¦ ARGUMENTS π¦
posβ the *type ** to cursor. like, that's your cursor pointer, she's just vibing wherever you point her π«Άheadβ the list head to take the element from. the actual list we're poking at πmemberβ the name of thelist_headwithin the struct. yep, the field name, spelled exactly like that π
β¨ DESCRIPTION β¨
bestie here's the tea β: it wraps around if pos is the first element β so it returns the last element instead. it's giving circular, it's giving "no dead ends in this list" π₯
π warning tho: the list is expected to be not empty. that's the vibe check you must pass before calling. no empty lists allowed, periodt.
π SEE ALSO π
the whole squad, fr fr β go check these out:
- Kernel file
./include/linux/list_private.h 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_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_from_reverse(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)
and that's the whole page, bestie, you ate that π this iconic lil manual came from ./include/linux and it's dated October 2026, under the name list_private...try_circular(9) β mwah, slay, see you in the next one ππ
π¦ 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