enable_and_queue_work(9)
π enable_and_queue_work(9) β Kernel API Manual bestie energy π
πΈ NAME πΈ
enable_and_queue_work β enable and queue a work item on a specific workqueue. Thatβs the whole vibe. β¨
β¨ SYNOPSIS β¨
bool enable_and_queue_work (struct workqueue_struct *wq , struct work_struct *work );
π ARGUMENTS π
wqβ the target workqueue, aka where the work item is headed. π―workβ the work item to be enabled and queued. π§
π¦ DESCRIPTION π¦
okay so this function combines the operations of enable_work and queue_work, which is literally a convenient way to enable and queue a work item in a single call. π«Ά It invokes enable_work on work and then queues it if the disable depth reached 0. Returns true if the disable depth reached 0 and work is queued, and false otherwise. periodt.
π‘ note bestie:workis always queued when disable depth reaches zero. If the desired behavior is queueing only if certain events took place whileworkis disabled, the user should implement the necessary state tracking and perform explicit conditional queueing afterenable_work.
π SEE ALSO π
Kernel file ./include/linux/workqueue.h says hi, and so do these icons:
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)alloc_ordered_workqueue(9)queue_work(9)queue_delayed_work(9)mod_delayed_work(9)schedule_work_on(9)schedule_work(9)schedule_delayed_work_on(9)schedule_delayed_work(9)
source/version: ./include/linux β’ date: October 2026 β’ page: enable_and_queue_work(9) β bye bestie, go queue something cute π
π
π¦ 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