summaryrefslogtreecommitdiffstats
path: root/sys/sys/mutex.h
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2005-06-23 21:55:11 +0000
committerjhb <jhb@FreeBSD.org>2005-06-23 21:55:11 +0000
commit1de20fc8107f79bbf674b04119ecb0b2c73e8e02 (patch)
tree5a5f77d65e440e11487fc21bec66ef8abf140fc5 /sys/sys/mutex.h
parent4e2603348a74cac9fc901cb90da392ead7565750 (diff)
downloadFreeBSD-src-1de20fc8107f79bbf674b04119ecb0b2c73e8e02.zip
FreeBSD-src-1de20fc8107f79bbf674b04119ecb0b2c73e8e02.tar.gz
Adjust some comments to be a bit more correct.
Approved by: re (scottl)
Diffstat (limited to 'sys/sys/mutex.h')
-rw-r--r--sys/sys/mutex.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/sys/mutex.h b/sys/sys/mutex.h
index 3942a5a..b2b678e 100644
--- a/sys/sys/mutex.h
+++ b/sys/sys/mutex.h
@@ -124,19 +124,19 @@ void _mtx_assert(struct mtx *m, int what, const char *file, int line);
* here, if they are not already defined in the machine-dependent mutex.h
*/
-/* Actually obtain mtx_lock */
+/* Try to obtain mtx_lock once. */
#ifndef _obtain_lock
#define _obtain_lock(mp, tid) \
atomic_cmpset_acq_ptr(&(mp)->mtx_lock, (void *)MTX_UNOWNED, (tid))
#endif
-/* Actually release mtx_lock */
+/* Try to release mtx_lock if it is unrecursed and uncontested. */
#ifndef _release_lock
#define _release_lock(mp, tid) \
atomic_cmpset_rel_ptr(&(mp)->mtx_lock, (tid), (void *)MTX_UNOWNED)
#endif
-/* Actually release mtx_lock quickly, assuming we own it. */
+/* Release mtx_lock quickly, assuming we own it. */
#ifndef _release_lock_quick
#define _release_lock_quick(mp) \
atomic_store_rel_ptr(&(mp)->mtx_lock, (void *)MTX_UNOWNED)
OpenPOWER on IntegriCloud