Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1649903
| From | Alex Naidis <alex.naidis@linux.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH V2] workqueue: Implement delayed_work_busy() |
| Date | 2017-05-24 22:10 +0200 |
| Message-ID | <tKKLw-6SV-9@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH V2] workqueue: Implement delayed_work_busy() Alex Naidis <alex.naidis@linux.com> - 2017-05-24 22:10 +0200 Re: [PATCH V2] workqueue: Implement delayed_work_busy() kbuild test robot <lkp@intel.com> - 2017-05-25 02:20 +0200
csiph-web