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-prev] [day] [month] [year] [list]
Message-ID: <tip-5b0f437df0a3e374d26ad533eb78fe64744f55a8@git.kernel.org>
Date:	Tue, 4 Aug 2009 14:15:38 GMT
From:	tip-bot for Bart Van Assche <bart.vanassche@...il.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...hat.com,
	akpm@...ux-foundation.org, gregkh@...e.de, tglx@...utronix.de,
	bart.vanassche@...il.com, mingo@...e.hu
Subject: [tip:core/cleanups] workqueues: Improve schedule_work() documentation

Commit-ID:  5b0f437df0a3e374d26ad533eb78fe64744f55a8
Gitweb:     http://git.kernel.org/tip/5b0f437df0a3e374d26ad533eb78fe64744f55a8
Author:     Bart Van Assche <bart.vanassche@...il.com>
AuthorDate: Thu, 30 Jul 2009 19:00:53 +0200
Committer:  Ingo Molnar <mingo@...e.hu>
CommitDate: Tue, 4 Aug 2009 15:21:16 +0200

workqueues: Improve schedule_work() documentation

Two important aspects of the schedule_work() function are not
yet documented:

 - that it is allowed to pass a struct work_struct * to this
   function that is already on the kernel-global workqueue;

 - the meaning of its return value.

The patch below documents both aspects.

Signed-off-by: Bart Van Assche <bart.vanassche@...il.com>
Cc: "Greg Kroah-Hartman" <gregkh@...e.de>
Cc: Andrew Morton <akpm@...ux-foundation.org>
LKML-Reference: <200907301900.54202.bart.vanassche@...il.com>
Signed-off-by: Ingo Molnar <mingo@...e.hu>


---
 kernel/workqueue.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 0668795..3c44b56 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -600,7 +600,12 @@ static struct workqueue_struct *keventd_wq __read_mostly;
  * schedule_work - put work task in global workqueue
  * @work: job to be done
  *
- * This puts a job in the kernel-global workqueue.
+ * Returns zero if @work was already on the kernel-global workqueue and
+ * non-zero otherwise.
+ *
+ * This puts a job in the kernel-global workqueue if it was not already
+ * queued and leaves it in the same position on the kernel-global
+ * workqueue otherwise.
  */
 int schedule_work(struct work_struct *work)
 {
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ