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.
This commit is contained in:
John Baldwin 2007-03-21 22:18:10 +00:00
parent aa89d8cd52
commit 73de183262

View File

@ -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_exclusive_sx(sx) \
WITNESS_CHECKORDER(&(sx)->lock_object, LOP_EXCLUSIVE, LOCK_FILE, \
LOCK_LINE)
#define witness_check_shared(l) \
WITNESS_CHECKORDER(&(l)->lock_object, 0, LOCK_FILE, LOCK_LINE)
#endif /* _KERNEL */
#endif /* _SYS_LOCK_H_ */