hlist_nulls_for_each_entry(9)
π 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β thestruct hlist_nodethat 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 thehlist_nodesitting inside the struct. tell it where the node lives and it'll handle the rest β¨
π₯ SEE ALSO π₯
- Kernel file
./include/linux/list_nulls.h get_nulls_value(9)hlist_nulls_unhashed(9)hlist_nulls_unhashed_lockless(9)hlist_nulls_for_each_entry_from(9)
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
- 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