mutex: improve header comment to be actually informative about the API
authorArjan van de Ven <arjan@linux.intel.com>
Wed, 29 Oct 2008 21:24:09 +0000 (14:24 -0700)
committerIngo Molnar <mingo@elte.hu>
Thu, 30 Oct 2008 18:55:00 +0000 (19:55 +0100)
Impact: improve documentation

It's nice to say that mutex_trylock follows the spin_trylock convention.
It's a lot nicer if the comment also says which that is...  make it so.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/mutex.h

index bc6da10..7a0e5c4 100644 (file)
@@ -144,6 +144,8 @@ extern int __must_check mutex_lock_killable(struct mutex *lock);
 /*
  * NOTE: mutex_trylock() follows the spin_trylock() convention,
  *       not the down_trylock() convention!
+ *
+ * Returns 1 if the mutex has been acquired successfully, and 0 on contention.
  */
 extern int mutex_trylock(struct mutex *lock);
 extern void mutex_unlock(struct mutex *lock);