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/9f2b9a51533f
branches: trunk
changeset: 343165:9f2b9a51533f
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 9c6d48e42236 -r 9f2b9a51533f 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