mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH V2] workqueue: Implement delayed_work_busy()
@ 2017-05-24 20:06 Alex Naidis
  2017-05-25  0:10 ` kbuild test robot
  0 siblings, 1 reply; 2+ messages in thread
From: Alex Naidis @ 2017-05-24 20:06 UTC (permalink / raw)
  To: Tejun Heo; +Cc: Alex Naidis, linux-kernel

work_busy() was available for regular work only,
however it is useful for delayed work too.

This implements a variant of work_busy() for
delayed work.

CC: linux-kernel@vger.kernel.org
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
---
 include/linux/workqueue.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h
index c102ef6..b7ae6ac 100644
--- a/include/linux/workqueue.h
+++ b/include/linux/workqueue.h
@@ -603,6 +603,15 @@ static inline bool schedule_delayed_work(struct delayed_work *dwork,
 	return queue_delayed_work(system_wq, dwork, delay);
 }
 
+/**
+ * delayed_work_busy - See work_busy()
+ * @work: the delayed work to be tested
+ */
+static inline unsigned int delayed_work_busy(struct delayed_work *dwork)
+{
+	return work_busy(&dwork->work);
+}
+
 #ifndef CONFIG_SMP
 static inline long work_on_cpu(int cpu, long (*fn)(void *), void *arg)
 {
-- 
2.7.4

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-05-25  0:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-24 20:06 [PATCH V2] workqueue: Implement delayed_work_busy() Alex Naidis
2017-05-25  0:10 ` kbuild test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®