hlist_nulls_for_each_entry(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… hlist_nulls_for_each_entry(9)

okay so bestie, welcome to the Kernel API Manual ✨ β€” this one's a macro page, it's short, it's sweet, and it's gonna make ur loop game iconic. The star of the show is hlist_nulls_for_each_entry πŸŽ€


🌸 NAME 🌸

hlist_nulls_for_each_entry β€” literally just iterate over a list of a given type πŸ’« no cap, that's the whole job.


πŸ¦‹ SYNOPSIS πŸ¦‹

hlist_nulls_for_each_entry (tpos , pos , head , member );

that's it. four things in, loop magic out 🧚


πŸ‘‘ ARGUMENTS πŸ‘‘

  • tpos β€” the type * that u use as ur loop cursor 🫢 this is the pointer that walks the entries for u.
  • pos β€” the struct hlist_node that u use as a loop cursor. yeah, there's two cursors, it's giving duo main character energy πŸ’…
  • head β€” the head for ur list, aka where the whole thing kicks off 🌈
  • member β€” the name of the hlist_node sitting inside the struct. tell it where the node lives and it'll handle the rest ✨

πŸ”₯ SEE ALSO πŸ”₯

go read those too, iykyk πŸ“šπŸ’–


bestie note: the whole nulls-list family lives in ./include/linux/list_nulls.h β€” that's where u go when u need the receipts πŸ™ˆ

okay that's the page!! mwah πŸ’‹ this little gem comes to u from ./include/linux, dated October 2026 β€” slay, periodt, go iterate something beautiful πŸ¦‹βœ¨πŸŒΈ

πŸ“¦ where this page comes from