diff options
author | jhb <jhb@FreeBSD.org> | 2001-09-25 23:51:54 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2001-09-25 23:51:54 +0000 |
commit | 667b7e6de375c00a0c27c1b5340c29638f605844 (patch) | |
tree | 8c9002f206de0564ad21dbff46f4f45a49c774a5 | |
parent | 08a4c946ef632b76520bbf30464e171d9ba76f47 (diff) | |
download | FreeBSD-src-667b7e6de375c00a0c27c1b5340c29638f605844.zip FreeBSD-src-667b7e6de375c00a0c27c1b5340c29638f605844.tar.gz |
Move the definition of LOCK_DEBUG from sys/lock.h to sys/_lock.h.
-rw-r--r-- | sys/sys/_lock.h | 16 | ||||
-rw-r--r-- | sys/sys/lock.h | 13 |
2 files changed, 16 insertions, 13 deletions
diff --git a/sys/sys/_lock.h b/sys/sys/_lock.h index cc035df..9841f45 100644 --- a/sys/sys/_lock.h +++ b/sys/sys/_lock.h @@ -31,6 +31,22 @@ #ifndef _SYS_LOCK_TYPES_H_ #define _SYS_LOCK_TYPES_H_ +#ifdef _KERNEL +/* + * If any of WITNESS, INVARIANTS, or KTR_LOCK KTR tracing has been enabled, + * then turn on LOCK_DEBUG. When this option is on, extra debugging + * facilities such as tracking the file and line number of lock operations + * are enabled. Also, mutex locking operations are not inlined to avoid + * bloat from all the extra debugging code. We also have to turn on all the + * calling conventions for this debugging code in modules so that modules can + * work with both debug and non-debug kernels. + */ +#if defined(KLD_MODULE) || defined(WITNESS) || defined(INVARIANTS) || defined(INVARIANT_SUPPORT) || (defined(KTR) && (KTR_COMPILE & KTR_LOCK)) +#define LOCK_DEBUG +#endif + +#endif /* _KERNEL */ + struct lock_object { struct lock_class *lo_class; const char *lo_name; diff --git a/sys/sys/lock.h b/sys/sys/lock.h index f773959..51fcac3 100644 --- a/sys/sys/lock.h +++ b/sys/sys/lock.h @@ -124,19 +124,6 @@ struct lock_list_entry { }; /* - * If any of WITNESS, INVARIANTS, or KTR_LOCK KTR tracing has been enabled, - * then turn on LOCK_DEBUG. When this option is on, extra debugging - * facilities such as tracking the file and line number of lock operations - * are enabled. Also, mutex locking operations are not inlined to avoid - * bloat from all the extra debugging code. We also have to turn on all the - * calling conventions for this debugging code in modules so that modules can - * work with both debug and non-debug kernels. - */ -#if defined(KLD_MODULE) || defined(WITNESS) || defined(INVARIANTS) || defined(INVARIANT_SUPPORT) || (defined(KTR) && (KTR_COMPILE & KTR_LOCK)) -#define LOCK_DEBUG -#endif - -/* * In the LOCK_DEBUG case, use the filename and line numbers for debugging * operations. Otherwise, use default values to avoid the unneeded bloat. */ |