queue_delayed_work(9)
π queue_delayed_work β the Kernel API Manual, bestie edition
okay so picture this: it's queue_delayed_work(9) from the Kernel API Manual, and it's here to let you queue up work on a workqueueβ¦ but like, later. Not now. After a delay. Main character scheduling behavior, honestly π
β¨ NAME β¨
queue_delayed_work β queue work on a workqueue after delay
No cap, that's the whole vibe: work goes on a workqueue, but only after a delay. Delayed gratification but make it kernel β¨
π¦ SYNOPSIS π¦
bool queue_delayed_work (struct workqueue_struct *wq , struct
delayed_work *dwork , unsigned long delay );
Look at that signature, it ate π
returns a bool, takes three things, we love a tidy little function.
πΈ ARGUMENTS πΈ
wqβ workqueue to use. this is the queue your work is gonna live on, so pick a good one bestie π«Άdworkβ delayable work to queue. literally thestruct delayed_workthat's getting queued up πdelayβ number of jiffies to wait before queueing. that's jiffies, not seconds, not milliseconds β jiffies, iykyk β³
π₯ DESCRIPTION π₯
Equivalent to queue_delayed_work_on but tries to use the local CPU.
That's it, that's the whole description β and honestly it's giving efficient. It does the same thing as queue_delayed_work_on, except it tries to use the local CPU instead of you naming a CPU yourself. Lowkey a little considerate of it, ngl ππ
note the "tries" energy β it tries to use the local CPU, we're not out here making promises we can't keep.
π SEE ALSO π
go read these next, they're all iconic in their own way π
- 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)alloc_ordered_workqueue(9)queue_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)
okay that's the whole page, go queue something delayed and slay π β¨
signing off from ./include/linux, dated October 2026 β this was queue_delayed_work(9), bestie, mwah π«Άπ
π¦ 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