Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1649001
| From | Alex Naidis <alex.naidis@linux.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] workqueue: Implement delayed_work_busy() |
| Date | 2017-05-24 01:40 +0200 |
| Message-ID | <tKrzb-22T-1@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
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 | 1 +
kernel/workqueue.c | 9 +++++++++
2 files changed, 10 insertions(+)
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h
index c102ef6..32ab046 100644
--- a/include/linux/workqueue.h
+++ b/include/linux/workqueue.h
@@ -467,6 +467,7 @@ extern void workqueue_set_max_active(struct workqueue_struct *wq,
extern bool current_is_workqueue_rescuer(void);
extern bool workqueue_congested(int cpu, struct workqueue_struct *wq);
extern unsigned int work_busy(struct work_struct *work);
+extern unsigned int delayed_work_busy(struct delayed_work *dwork);
extern __printf(1, 2) void set_worker_desc(const char *fmt, ...);
extern void print_worker_info(const char *log_lvl, struct task_struct *task);
extern void show_workqueue_state(void);
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index c74bf39..658cc2e 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -4224,6 +4224,15 @@ unsigned int work_busy(struct work_struct *work)
}
EXPORT_SYMBOL_GPL(work_busy);
+/*
+ * See work_busy()
+ */
+unsigned int delayed_work_busy(struct delayed_work *dwork)
+{
+ return work_busy(&dwork->work);
+}
+EXPORT_SYMBOL_GPL(delayed_work_busy);
+
/**
* set_worker_desc - set description for the current work item
* @fmt: printf-style format string
--
2.7.4
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] workqueue: Implement delayed_work_busy() Alex Naidis <alex.naidis@linux.com> - 2017-05-24 01:40 +0200
Re: [PATCH] workqueue: Implement delayed_work_busy() Tejun Heo <tj@kernel.org> - 2017-05-24 17:20 +0200
Fwd: [PATCH] workqueue: Implement delayed_work_busy() Alex Naidis <alex.naidis@linux.com> - 2017-05-24 22:10 +0200
Re: [PATCH] workqueue: Implement delayed_work_busy() Tejun Heo <tj@kernel.org> - 2017-05-24 22:10 +0200
Re: [PATCH] workqueue: Implement delayed_work_busy() Alex Naidis <alex.naidis@linux.com> - 2017-05-24 22:20 +0200
Re: [PATCH] workqueue: Implement delayed_work_busy() Tejun Heo <tj@kernel.org> - 2017-05-24 22:30 +0200
Re: [PATCH] workqueue: Implement delayed_work_busy() Alex Naidis <alex.naidis@linux.com> - 2017-05-24 22:40 +0200
csiph-web