for_each_pool_worker(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… for_each_pool_worker(9) πŸ’…

okay so we're in the Kernel API Manual, and today's main character is for_each_pool_worker(9) β€” the little iterator that goes through all workers of a worker_pool. iconic behavior. ✨


πŸŽ€ NAME πŸŽ€

for_each_pool_worker β€” iterate through all workers of a worker_pool. literally that's the vibe. πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

for_each_pool_worker (worker , pool );

🌸 ARGUMENTS 🌸

  • worker β€” iteration cursor. it's the little cursor doing the looping, bestie. 🫢
  • pool β€” the worker_pool to iterate workers of. yes, that exact one. πŸŽ€

✨ DESCRIPTION ✨

okay so before you do the whole loop thing: this must be called with wq_pool_attach_mutex. not optional, not a suggestion, it's giving hard requirement. πŸ”’

and the if/else clause you might clock in there? it exists only for the lockdep assertion and can be ignored. no cap, don't let it distract you. πŸ’…


πŸ”₯ SEE ALSO πŸ”₯

the Kernel file ./kernel/workqueue.c is home base, and the SEE ALSO list is literally a whole squad. here's the full lineup, in order, no skips: πŸ‘‘


okay that's the whole page, bestie 🫢 β€” source/version: ./kernel; date: October 2026. byeee! πŸ’–

πŸ“¦ where this page comes from