hlist_bl_for_each_entry(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… hlist_bl_for_each_entry (Kernel API Manual, bestie)

okay so this is a page from the Kernel API Manual and honestly? it's a little one but it's iconic. sit down, grab a strawberry πŸ“, we're learning to walk a list.

✨ NAME ✨

hlist_bl_for_each_entry β€” literally iterate over a list of a given type. that's the whole vibe. main character energy for your linked list πŸ¦‹


🌸 SYNOPSIS 🌸

hlist_bl_for_each_entry (tpos , pos , head , member );

so you've got the macro, you've got four things going in, and it's gonna loop for you. slay.

πŸŽ€ ARGUMENTS πŸŽ€

four besties walk into a macro:

  • tpos β€” the type * you're using as your loop cursor. that's your main character pointer, the one you actually get to touch inside the loop. πŸ’–
  • pos β€” the struct hlist_node you're using as a loop cursor. yes it's also a cursor, no it's not the same one, they're different cursors, it's giving two-cursor household 🫢
  • head β€” the head of your list. like, the very start of it. the front door. the entrance. πŸ‘‘
  • member β€” the name of the hlist_node inside the struct. iykyk β€” it's the field name that lets the macro figure out where the node lives inside your type. 🌈
ngl, tpos and pos both being cursors is a lot, but that's the design and we respect it πŸ’…

🌟 SEE ALSO 🌟

  • Kernel file ./include/linux/list_bl.h β€” go read it, it's right there 🌸
  • hlist_bl_for_each_entry_safe(9) β€” the safe one. the responsible sibling. check it out fr fr πŸ”₯

that's the page!! no cap, that's genuinely all of it, every argument accounted for, nothing skipped, we ate and left no crumbs πŸŽ€βœ¨

made with love from ./include/linux, dated October 2026, and yeah the page is literally called hlist_bl_for_each_entry(9) β€” bye bestie, go walk some lists πŸ’œπŸ§š

πŸ“¦ where this page comes from