Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev Fix non-cpu counter build.



details:   https://anonhg.NetBSD.org/src/rev/32c7e27220d3
branches:  trunk
changeset: 813307:32c7e27220d3
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Jan 24 01:01:11 2016 +0000

description:
Fix non-cpu counter build.

diffstat:

 sys/dev/lockstat.h |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (34 lines):

diff -r d1c4de5744a3 -r 32c7e27220d3 sys/dev/lockstat.h
--- a/sys/dev/lockstat.h        Sun Jan 24 00:14:50 2016 +0000
+++ b/sys/dev/lockstat.h        Sun Jan 24 01:01:11 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lockstat.h,v 1.13 2015/03/09 01:41:41 christos Exp $   */
+/*     $NetBSD: lockstat.h,v 1.14 2016/01/24 01:01:11 christos Exp $   */
 
 /*-
  * Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -181,9 +181,6 @@
 
 void   lockstat_event(uintptr_t, uintptr_t, u_int, u_int, uint64_t);
 
-extern volatile u_int  lockstat_enabled;
-extern volatile u_int  lockstat_dev_enabled;
-
 #else
 
 #define        LOCKSTAT_FLAG(name)                                     /* nothing */
@@ -216,9 +213,14 @@
 #define KDTRACE_LOCKSTAT_ENABLED 0
 #endif
 
+#if defined(_KERNEL) && NLOCKSTAT > 0
+extern volatile u_int  lockstat_enabled;
+extern volatile u_int  lockstat_dev_enabled;
+
 #define LOCKSTAT_ENABLED_UPDATE() do { \
        lockstat_enabled = lockstat_dev_enabled | KDTRACE_LOCKSTAT_ENABLED; \
        membar_producer(); \
     } while (/*CONSTCOND*/0)
+#endif
 
 #endif /* _SYS_LOCKSTAT_H_ */



Home | Main Index | Thread Index | Old Index