Commit d98d38f2014ab79f28c126ff175d034891f7aefc

Authored by Arjan van de Ven
Committed by Ingo Molnar
1 parent d1a76187a5

mutex: improve header comment to be actually informative about the API

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>

Showing 1 changed file with 2 additions and 0 deletions Side-by-side Diff

include/linux/mutex.h
... ... @@ -144,6 +144,8 @@
144 144 /*
145 145 * NOTE: mutex_trylock() follows the spin_trylock() convention,
146 146 * not the down_trylock() convention!
  147 + *
  148 + * Returns 1 if the mutex has been acquired successfully, and 0 on contention.
147 149 */
148 150 extern int mutex_trylock(struct mutex *lock);
149 151 extern void mutex_unlock(struct mutex *lock);