alloc_ordered_workqueue(9)
β¨ alloc_ordered_workqueue(9) β¨
okay so bestie, welcome to the alloc_ordered_workqueue page π
this is a Kernel API Manual entry and it's genuinely one of the cutest little allocation functions in the kernel, fr fr. buckle up π
πΈ NAME πΈ
alloc_ordered_workqueue β allocate an ordered workqueue π
β¨ SYNOPSIS β¨
alloc_ordered_workqueue (fmt , flags , args... );
like yes, that's the whole vibe π three parameter slots, one dream.
π¦ ARGUMENTS π¦
fmtβ theprintfformat for the name of the workqueue π·οΈ this is literally what your wq is gonna be called, so make it goodflagsβ theWQ_*flags π« and listen, onlyWQ_FREEZABLEandWQ_MEM_RECLAIMare actually meaningful here, the rest are just... there, doing nothing, no cap πargsβ the args forfmtπ«Ά you know, the stuff that fills in the format placeholders
π DESCRIPTION π
so what does it do? it allocates an ordered workqueue π An ordered workqueue executes at most one work item at any given time, and it does it in the queued order β like a very polite single-file line where nobody cuts π§
and how are they implemented, you ask? they're implemented as unbound workqueues with max_active of one π₯ that's the whole secret, iykyk.
π RETURN π
- Pointer to the allocated workqueue on success β
NULLon failure π
check for that NULL, bestie, please π it's giving "unhandled error" energy and we don't want that for you.
π SEE ALSO π
all the friends in the same friend group:
- Kernel file
./include/linux/workqueue.h struct workqueue_attrs(9)work_pending(9)delayed_work_pending(9)alloc_workqueue(9)devm_alloc_workqueue(9)alloc_workqueue_lockdep_map(9)alloc_ordered_workqueue_lockdep_map(9)queue_work(9)queue_delayed_work(9)mod_delayed_work(9)schedule_work_on(9)schedule_work(9)enable_and_queue_work(9)schedule_delayed_work_on(9)schedule_delayed_work(9)
and that's the page, bestie π«Ά shoutout to the source tree at ./include/linux, dated October 2026, and to the manual page alloc_ordered_workqueue(9) itself β iconic, no notes π
β¨π
π¦ 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