Spell out behavior of atomic_dec_and_lock() in kerneldoc
authorJ. Bruce Fields <bfields@citi.umich.edu>
Mon, 7 Apr 2008 19:59:05 +0000 (15:59 -0400)
committerJonathan Corbet <corbet@lwn.net>
Fri, 11 Apr 2008 19:17:46 +0000 (13:17 -0600)
A little more detail here wouldn't hurt.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
include/linux/spinlock.h

index 576a5f77d3bd8d6583bec34b6c2d95dbe3bf362b..1129ee0a718030ca058b35b1e6f7cf862efff522 100644 (file)
@@ -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) \