From: tip-bot for Bart Van Assche <bart.vanassche@gmail.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
akpm@linux-foundation.org, gregkh@suse.de, tglx@linutronix.de,
bart.vanassche@gmail.com, mingo@elte.hu
Subject: [tip:core/cleanups] workqueues: Improve schedule_work() documentation
Date: Tue, 4 Aug 2009 14:15:38 GMT [thread overview]
Message-ID: <tip-5b0f437df0a3e374d26ad533eb78fe64744f55a8@git.kernel.org> (raw)
In-Reply-To: <200907301900.54202.bart.vanassche@gmail.com>
Commit-ID: 5b0f437df0a3e374d26ad533eb78fe64744f55a8
Gitweb: http://git.kernel.org/tip/5b0f437df0a3e374d26ad533eb78fe64744f55a8
Author: Bart Van Assche <bart.vanassche@gmail.com>
AuthorDate: Thu, 30 Jul 2009 19:00:53 +0200
Committer: Ingo Molnar <mingo@elte.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@gmail.com>
Cc: "Greg Kroah-Hartman" <gregkh@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
LKML-Reference: <200907301900.54202.bart.vanassche@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.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)
{
prev parent reply other threads:[~2009-08-04 14:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-30 17:00 [PATCH 2.6.30] schedule_work() documentation improvements Bart Van Assche
2009-08-04 14:15 ` tip-bot for Bart Van Assche [this message]
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=tip-5b0f437df0a3e374d26ad533eb78fe64744f55a8@git.kernel.org \
--to=bart.vanassche@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=gregkh@suse.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
/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
Powered by JetHome