LIST_HEAD(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 LIST_HEAD(9) 🌸 the Kernel API Manual page, bestie

okay so picture this: you're deep in kernel land, you need a linked list node, and you want it already initialized at declaration time. That's the whole gig. This little macro is the definition of a &struct list_head with initialization values baked right in. no cap, it's that simple. ✨


✨ NAME ✨

LIST_HEAD β€” the definition of a &struct list_head with initialization values, i.e. it's giving "born ready" energy. πŸŽ€


πŸ’… SYNOPSIS πŸ’…

LIST_HEAD (name );

like yes that's the whole thing, she's lowkey minimal. πŸ¦‹


🫢 ARGUMENTS 🫢

  • name β€” bestie, this is just the name of the list_head. that's it. that's the argument. name her something cute. πŸ’–

πŸ”₯ SEE ALSO πŸ”₯

okay this is the part where the page goes FULL main-character and shouts out literally the entire list family. every single one, no skips, iykyk. πŸ‘‘

the header file where all this lives: Kernel file ./include/linux/list.h

the list girlies:

the entry / iteration squad:

and the hlist cousins, we don't forget family:


ngl bestie this page is short but she's iconic β€” it's one macro, one argument, and a whole extended family in SEE ALSO. periodt. πŸ’€βœ¨

and that's the tea πŸ“ β€” this one comes from ./include/linux, dated October 2026, straight out of the Kernel API Manual. mwah, go forth and initialize your lists πŸ’œπŸ§šβ€β™€οΈπŸŽ€

πŸ“¦ where this page comes from