aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/lock.h
diff options
context:
space:
mode:
authorAttilio Rao <attilio@FreeBSD.org>2013-12-02 22:34:47 +0000
committerAttilio Rao <attilio@FreeBSD.org>2013-12-02 22:34:47 +0000
commit3cd260b2228a7690b644eeab76c7d942aee7073f (patch)
tree98cb33d360b17393e49c674384b0c432ab1591e9 /sys/sys/lock.h
parentc5476f1b8b3ae74bb863465706ecb62e2279e924 (diff)
downloadsrc-3cd260b2228a7690b644eeab76c7d942aee7073f.tar.gz
src-3cd260b2228a7690b644eeab76c7d942aee7073f.zip
Right now LOCK_DEBUG is enabled if KTR is on.
This is to support LOCK_LOG_* functionality effectively in debugging environments but it is overkill because really LOCK_DEBUG should be on only if (KTR_COMPILE & KTR_LOCK) is true. Fix this by applying the correct logic. In this process, move the KTR classes to its own header to reduce namespace pollution. Sponsored by: EMC / Isilon storage division Reviewed by: jhb
Notes
Notes: svn path=/head/; revision=258858
Diffstat (limited to 'sys/sys/lock.h')
-rw-r--r--sys/sys/lock.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/sys/lock.h b/sys/sys/lock.h
index 58343b594837..4ff0e79f8168 100644
--- a/sys/sys/lock.h
+++ b/sys/sys/lock.h
@@ -34,6 +34,7 @@
#include <sys/queue.h>
#include <sys/_lock.h>
+#include <sys/ktr_class.h>
struct lock_list_entry;
struct thread;
@@ -123,7 +124,7 @@ struct lock_class {
* 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) || defined(LOCK_PROFILING)
+#if defined(KLD_MODULE) || defined(WITNESS) || defined(INVARIANTS) || defined(INVARIANT_SUPPORT) || defined(LOCK_PROFILING) || (defined(KTR) && (KTR_COMPILE & KTR_LOCK))
#define LOCK_DEBUG 1
#else
#define LOCK_DEBUG 0