Module Name:    src
Committed By:   christos
Date:           Sun Jan 24 01:01:11 UTC 2016

Modified Files:
        src/sys/dev: lockstat.h

Log Message:
Fix non-cpu counter build.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/lockstat.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/lockstat.h
diff -u src/sys/dev/lockstat.h:1.13 src/sys/dev/lockstat.h:1.14
--- src/sys/dev/lockstat.h:1.13	Sun Mar  8 21:41:41 2015
+++ src/sys/dev/lockstat.h	Sat Jan 23 20:01:11 2016
@@ -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 @@ do {									\
 
 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 @@ void		lockstat_probe_stub(uint32_t, uint
 #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_ */

Reply via email to