list_next_entry(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 β€” the type * 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 the list_head within the struct. 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_entry is the next one. if you wanted the previous one, that's list_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