lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1495656385-30478-1-git-send-email-alex.naidis@linux.com>
Date:   Wed, 24 May 2017 22:06:25 +0200
From:   Alex Naidis <alex.naidis@...ux.com>
To:     Tejun Heo <tj@...nel.org>
Cc:     Alex Naidis <alex.naidis@...ux.com>, linux-kernel@...r.kernel.org
Subject: [PATCH V2] workqueue: Implement delayed_work_busy()

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@...r.kernel.org
Signed-off-by: Alex Naidis <alex.naidis@...ux.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ