enable_and_queue_work(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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: work is always queued when disable depth reaches zero. If the desired behavior is queueing only if certain events took place while work is disabled, the user should implement the necessary state tracking and perform explicit conditional queueing after enable_work.

🌈 SEE ALSO 🌈

Kernel file ./include/linux/workqueue.h says hi, and so do these icons:

source/version: ./include/linux β€’ date: October 2026 β€’ page: enable_and_queue_work(9) β€” bye bestie, go queue something cute πŸ’…πŸ’–

πŸ“¦ where this page comes from