From: Alex Naidis <alex.naidis@linux.com>
To: Tejun Heo <tj@kernel.org>
Cc: Alex Naidis <alex.naidis@linux.com>, linux-kernel@vger.kernel.org
Subject: [PATCH V2] workqueue: Implement delayed_work_busy()
Date: Wed, 24 May 2017 22:06:25 +0200 [thread overview]
Message-ID: <1495656385-30478-1-git-send-email-alex.naidis@linux.com> (raw)
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
next reply other threads:[~2017-05-24 20:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-24 20:06 Alex Naidis [this message]
2017-05-25 0:10 ` kbuild test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1495656385-30478-1-git-send-email-alex.naidis@linux.com \
--to=alex.naidis@linux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®