list_next_entry(9)
π list_next_entry(9) β the Kernel API Manual, but make it make sense
okay bestie so real talk: this is list_next_entry(9) from the Kernel API Manual, and it's genuinely one of the smaller little icons in the whole linked-list cinematic universe. like it's not doing a lot but it's doing it flawlessly. π
β¨ NAME β¨
list_next_entry β get the next element in list. that's it. that's the whole job. she's a one-line queen and honestly? main character energy. π
πΈ SYNOPSIS πΈ
list_next_entry (pos , member );
yes the spacing is Like That in the original, we do not fix it, we respect it. pos then member, in that order, always, no cap. π
π¦ ARGUMENTS π¦
posβ thetype *to cursor. it's the pointer you're currently sitting on, the "you are here" of the whole operation. think of it as your little map dot πΊοΈmemberβ the name of thelist_headwithin thestruct. like, the actual field name inside your struct that holds the list hookup, so the macro knows where to look. iykyk π«Ά
β SEE ALSO β
so there's a whole friendship group here and you will be meeting all of them, no skipping, i don't make the rules (the kernel does):
Kernel file ./tools/include/linux/list.h plus 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_prev_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), and list_for_each_from(9).
like look at that roster. it's giving family reunion and every single one of them ate. π₯π
friendly reminder:list_next_entryis the next one. if you wanted the previous one, that'slist_prev_entry(9)and she's right there in the list, go say hi π¦
π§ a lil sign-off π§
that's the whole page bestie, short and iconic. source sitch: ./tools/include/linux, dated October 2026, and it's filed under list_next_entry(9) in case you forgot where you were. 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