From: J. Bruce Fields Date: Mon, 7 Apr 2008 19:59:05 +0000 (-0400) Subject: Spell out behavior of atomic_dec_and_lock() in kerneldoc X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=dc07e721a26ec7e0adb66340f1763d220cfbbd0c;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git Spell out behavior of atomic_dec_and_lock() in kerneldoc A little more detail here wouldn't hurt. Signed-off-by: J. Bruce Fields Signed-off-by: Jonathan Corbet --- diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h index 576a5f77d3bd..1129ee0a7180 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) \