mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@citi.umich.edu>
To: Jon Corbet <corbet@lwn.net>
Cc: Randy Dunlap <rdunlap@xenotime.net>,
	linux-kernel@vger.kernel.org,
	"J. Bruce Fields" <bfields@citi.umich.edu>
Subject: [PATCH] Spell out behavior of atomic_dec_and_lock() in kerneldoc
Date: Mon,  7 Apr 2008 15:59:05 -0400	[thread overview]
Message-ID: <1207598345-14295-4-git-send-email-bfields@citi.umich.edu> (raw)
In-Reply-To: <1207598345-14295-3-git-send-email-bfields@citi.umich.edu>

A little more detail here wouldn't hurt.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
---
 include/linux/spinlock.h |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h
index 576a5f7..1129ee0 100644
--- a/include/linux/spinlock.h
+++ b/include/linux/spinlock.h
@@ -341,6 +341,9 @@ static inline void double_spin_unlock(spinlock_t *l1, spinlock_t *l2,
  * atomic_dec_and_lock - lock on reaching reference count zero
  * @atomic: the atomic counter
  * @lock: the spinlock in question
+ *
+ * Decrements @atomic by 1.  If the result is 0, returns true and locks
+ * @lock.  Returns false for all other cases.
  */
 extern int _atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock);
 #define atomic_dec_and_lock(atomic, lock) \
-- 
1.5.5.rc1


  reply	other threads:[~2008-04-07 19:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-07 19:59 miscellaneous documentation patches J. Bruce Fields
2008-04-07 19:59 ` [PATCH] Documentation: move nfsroot.txt to filesystems/ J. Bruce Fields
2008-04-07 19:59   ` [PATCH] Documentation: move rpc-cache.txt " J. Bruce Fields
2008-04-07 19:59     ` J. Bruce Fields [this message]
2008-04-07 20:26 ` miscellaneous documentation patches Jonathan Corbet
2008-04-07 20:31   ` [PATCH] Move sced-rt-group.txt to scheduler/ J. Bruce Fields
2008-04-07 20:39     ` [PATCH] Move sched-rt-group.txt " J. Bruce Fields

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=1207598345-14295-4-git-send-email-bfields@citi.umich.edu \
    --to=bfields@citi.umich.edu \
    --cc=corbet@lwn.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rdunlap@xenotime.net \
    /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®