diff options
author | jhb <jhb@FreeBSD.org> | 2007-03-21 22:18:10 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2007-03-21 22:18:10 +0000 |
commit | dee82f63223926cc8f13099524d77b36135890ea (patch) | |
tree | eecc0a6b5b6929565d762ffefaf974105c01c8f1 /sys/sys/lock.h | |
parent | a84f74bb36d0c3edb2676543f0a1da4e07912da8 (diff) | |
download | FreeBSD-src-dee82f63223926cc8f13099524d77b36135890ea.zip FreeBSD-src-dee82f63223926cc8f13099524d77b36135890ea.tar.gz |
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.
Diffstat (limited to 'sys/sys/lock.h')
-rw-r--r-- | sys/sys/lock.h | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/sys/sys/lock.h b/sys/sys/lock.h index d46ac0d..1c9940c 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_ */ |