alloc_workqueue_lockdep_map(9)

๐Ÿ“ฆ version 7.3.1, in nixpkgs unstable

๐Ÿ’… alloc_workqueue_lockdep_map(9) โ€” the kernel API manual, but make it make sense

okay so real talk, this page lives in the Kernel API Manual section (alloc_workqueue_lockdep_map(9), bestie, that's the manual name, now you know ๐Ÿซถ) and it's about allocating a workqueue โ€” but like, with your own lockdep_map. yes ma'am, custom lockdep energy.


โœจ NAME โœจ

alloc_workqueue_lockdep_map โ€” allocate a workqueue with user-defined lockdep_map ๐Ÿ’ซ

๐ŸŽ€ SYNOPSIS ๐ŸŽ€

struct workqueue_struct * alloc_workqueue_lockdep_map (const char *fmt
, unsigned int flags , int max_active , struct lockdep_map *lockdep_map
, ... );

๐ŸŒธ ARGUMENTS ๐ŸŒธ

  • fmt โ€” the printf format for the name of the workqueue, so it gets a cute little name of its own โœจ
  • flags โ€” the WQ_* flags, babes
  • max_active โ€” max in-flight work items; pass 0 and you get the default, no thoughts needed ๐Ÿ™ˆ
  • lockdep_map โ€” a user-defined lockdep_map, yours to own ๐Ÿ‘‘
  • ... โ€” the args for fmt, obviously

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

Same as alloc_workqueue but with the a user-define lockdep_map. (yes, that's the original wording energy, we're keeping it ๐Ÿ’€)

It's useful for workqueues created with the same purpose, and โ€” the whole point, lowkey โ€” to avoid leaking a lockdep_map on each workqueue creation. like, stop making a new one every single time, it's giving wasteful ๐Ÿšฎ

โญ RETURN โญ

Pointer to the allocated workqueue on success, NULL on failure. that's it, that's the deal ๐Ÿซก

๐ŸŒˆ SEE ALSO ๐ŸŒˆ

Kernel file ./include/linux/workqueue.h, plus the whole friend group:


ngl, the lockdep_map thing is the main character here โ€” one map, shared, no leaking, periodt ๐Ÿ’…

and that's the page!! sign-off time: this one comes from ./include/linux, dated October 2026, and it's filed under alloc_workqueue_lockdep_map(9). slay, go allocate responsibly ๐Ÿงš๐Ÿ’œ

๐Ÿ“ฆ where this page comes from