mod_delayed_work_on(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

mod_delayed_work_on(9) β€” okay so this is from the Kernel API Manual, and she is the function you call when a delayed work needs a little schedule glow-up on a specific CPU. bestie, let’s get into it. πŸŽ€

✨ NAME ✨

mod_delayed_work_on β€” modify delay of or queue a delayed work on specific CPU. πŸ’…

✨ SYNOPSIS ✨

bool mod_delayed_work_on (int cpu , struct workqueue_struct *wq , struct delayed_work *dwork , unsigned long delay );

✨ ARGUMENTS ✨

  • cpu β€” CPU number to execute work on. πŸ–₯️
  • wq β€” workqueue to use. πŸŽ€
  • dwork β€” work to queue. πŸ¦‹
  • delay β€” number of jiffies to wait before queueing. ⏳

✨ DESCRIPTION ✨

okay so here’s the tea: if dwork is idle, this is equivalent to queue_delayed_work_on. otherwise, you’re modifying dwork’s timer so that it expires after delay. πŸ•°οΈβœ¨

and if delay is zero, work is guaranteed to be scheduled immediately regardless of its current state. that’s the icon behavior, no cap. πŸ’…

this function is safe to call from any context, including IRQ handler. not me being brave. see try_to_grab_pending for details. 🫢

✨ RETURN ✨

  • false β€” dwork was idle and queued. πŸ˜΄βž‘οΈπŸ“‹
  • true β€” dwork was pending and its timer was modified. ⏲️✨

✨ SEE ALSO ✨

mwah πŸ’‹ β€” source/version is ./kernel, dated October 2026, and this was the mod_delayed_work_on(9) page. byeee 🫢✨

πŸ“¦ where this page comes from