list_prev_entry(9)
π list_prev_entry(9) β Kernel API Manual β¨
okay so bestie, welcome to the list_prev_entry glow-up. this is a <pink>Kernel API Manual</pink> page and honestly it's a little icon: one macro, two arguments, zero drama. she does exactly one thing and she does it cute. π
πΈ NAME πΈ
list_prev_entry β get the prev element in list
like, the previous one. the one behind you in line. main character energy but make it backwards. π
β¨ SYNOPSIS β¨
list_prev_entry (pos , member );
yes that spacing is real, don't come for her, she's been through a lot. π«Ά
π¦ ARGUMENTS π¦
posβ the type * to cursor. it's your lil pointer bestie, the one you're using as the cursor, and it's typed as a * to whatever your struct is. πmemberβ the name of thelist_headwithin the struct. literally just the field name, the little embedded list node living inside your bigger struct. she's the reason any of this works. π
π SEE ALSO π
the whole friend group, no gatekeeping, iykyk:
list_add(9)list_add_tail(9)list_replace(9)list_del_init(9)list_move(9)list_move_tail(9)list_is_first(9)list_is_last(9)list_empty(9)list_empty_careful(9)list_rotate_left(9)list_is_singular(9)list_cut_position(9)list_splice(9)list_splice_tail(9)list_splice_init(9)list_splice_tail_init(9)list_entry(9)list_first_entry(9)list_last_entry(9)list_first_entry_or_null(9)list_last_entry_or_null(9)list_next_entry(9)list_for_each(9)list_for_each_prev(9)list_for_each_safe(9)list_for_each_prev_safe(9)list_for_each_entry(9)list_for_each_entry_reverse(9)list_prepare_entry(9)list_for_each_entry_continue(9)list_for_each_entry_continue_reverse(9)list_for_each_entry_from(9)list_for_each_entry_safe(9)list_for_each_entry_safe_continue(9)list_for_each_entry_safe_from(9)list_for_each_entry_safe_reverse(9)list_safe_reset_next(9)hlist_for_each_entry(9)hlist_for_each_entry_continue(9)hlist_for_each_entry_from(9)hlist_for_each_entry_safe(9)list_del_range(9)list_for_each_from(9)
and if you actually want to read the source (bestie, go off) it lives in the kernel file ./tools/include/linux/list.h πβ¨
ngl the member arg is the chaos goblin of this whole thing β it's a name, not a value, so get the spelling right or the compiler will simply end you. no cap. π
mwah, that's the whole page. sending you off from ./tools/include/linux, dated October 2026, still serving list_prev_entry(9) realness. slay, bye! ππ¦πΈπππ«Ά
π¦ 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