aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/lock.h
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2007-03-21 22:18:10 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2007-03-21 22:18:10 +0000
commit73de1832625a14e9e7d37dba50e8cd43775c5e5a (patch)
treeeecc0a6b5b6929565d762ffefaf974105c01c8f1 /sys/sys/lock.h
parentaa89d8cd5299e308fe8eaa099fe89bfeb40917d1 (diff)
downloadsrc-73de1832625a14e9e7d37dba50e8cd43775c5e5a.tar.gz
src-73de1832625a14e9e7d37dba50e8cd43775c5e5a.zip
Make use of 'lock_object' being the same field name in the witness_check*()
macros. - witness_check() replaces witness_check_mtx() and witness_check_exclusive_sx() and checks for an exclusive acquire of either a mutex, rwlock, or sx lock. - witness_check_shared() replaces witness_check_shared_sx() and checks for a shared acquire of either a rwlock or sx lock.
Notes
Notes: svn path=/head/; revision=167788
Diffstat (limited to 'sys/sys/lock.h')
-rw-r--r--sys/sys/lock.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/sys/sys/lock.h b/sys/sys/lock.h
index d46ac0d4a894..1c9940c46070 100644
--- a/sys/sys/lock.h
+++ b/sys/sys/lock.h
@@ -325,16 +325,12 @@ const char *witness_file(struct lock_object *);
* Helper macros to allow developers to add explicit lock order checks
* wherever they please without having to actually grab a lock to do so.
*/
-#define witness_check_mutex(m) \
- WITNESS_CHECKORDER(&(m)->lock_object, LOP_EXCLUSIVE, LOCK_FILE, \
+#define witness_check(l) \
+ WITNESS_CHECKORDER(&(l)->lock_object, LOP_EXCLUSIVE, LOCK_FILE, \
LOCK_LINE)
-#define witness_check_shared_sx(sx) \
- WITNESS_CHECKORDER(&(sx)->lock_object, 0, LOCK_FILE, LOCK_LINE)
+#define witness_check_shared(l) \
+ WITNESS_CHECKORDER(&(l)->lock_object, 0, LOCK_FILE, LOCK_LINE)
-#define witness_check_exclusive_sx(sx) \
- WITNESS_CHECKORDER(&(sx)->lock_object, LOP_EXCLUSIVE, LOCK_FILE, \
- LOCK_LINE)
-
#endif /* _KERNEL */
#endif /* _SYS_LOCK_H_ */