plist_for_each(9)
β¨ plist_for_each(9) β the kernel API manual, bestie edition β¨
Okay so real talk, this is a page from the Kernel API Manual and it's about plist_for_each, which is literally the little loop that walks your plist for you. It's short, it's sweet, and it's giving "tiny but essential" energy. Let's go π
πΈ NAME πΈ
plist_for_each β iterate over the plist. That's it, that's the whole job. She loops, she iterates, she slays. β¨
π¦ SYNOPSIS π¦
plist_for_each (pos , head );
No cap, that's the whole signature. Two things go in, and the loop does its thing. π
π ARGUMENTS π
posβ thetype *you're using as your loop counter. She's the main character of the loop, keeping track of where you are rn. πheadβ the head of your list. This is where the whole vibe starts, iykyk. π
π SEE ALSO π
Bestie, there's a whole friend group here, all chillin' in the kernel file ./include/linux/plist.h:
PLIST_HEAD_INIT(9)PLIST_HEAD(9)PLIST_NODE_INIT(9)plist_head_init(9)plist_node_init(9)plist_for_each_continue(9)plist_for_each_safe(9)plist_for_each_entry(9)plist_for_each_entry_continue(9)plist_for_each_entry_safe(9)plist_head_empty(9)plist_node_empty(9)plist_first_entry(9)plist_last_entry(9)plist_next(9)plist_prev(9)plist_first(9)plist_last(9)
Like, the whole squad is documented, so go read them too. Obsessed with a complete reference section honestly π«Ά
Heads up bestie: this page is just the loop macro itself β the deets on the plist structures live in those SEE ALSO pages, so don't come for me if you wanted a field-by-field breakdown. π
And that's the whole page! π Source/version vibes: she lives in ./include/linux and the date on this one is October 2026 β so yeah, mark your calendar bestie, this page is from the future and she ate. π¦β¨π
π¦ 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