summaryrefslogtreecommitdiffstats
path: root/include/linux/mutex.h
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2008-10-29 14:24:09 -0700
committerIngo Molnar <mingo@elte.hu>2008-10-30 19:55:00 +0100
commitd98d38f2014ab79f28c126ff175d034891f7aefc (patch)
tree4c23b3c5e202b3ecb0ba35f167da6c204cbd862d /include/linux/mutex.h
parentd1a76187a5be4f89c6cb19d800cb5fb7aac735c5 (diff)
downloadop-kernel-dev-d98d38f2014ab79f28c126ff175d034891f7aefc.zip
op-kernel-dev-d98d38f2014ab79f28c126ff175d034891f7aefc.tar.gz
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>
Diffstat (limited to 'include/linux/mutex.h')
-rw-r--r--include/linux/mutex.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/mutex.h b/include/linux/mutex.h
index bc6da10..7a0e5c4 100644
--- a/include/linux/mutex.h
+++ b/include/linux/mutex.h
@@ -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);
OpenPOWER on IntegriCloud