diff options
| author | christos <christos@NetBSD.org> | 2016-01-24 01:01:11 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2016-01-24 01:01:11 +0000 |
| commit | fb40e073b8473224ecdf7376ebeeb7bd49056abc (patch) | |
| tree | ffa16c07f1813f5b1c33fa5f0b02371c9e6cfb3d /sys/dev/lockstat.h | |
| parent | b635c947bd6fb7ae564db1bb9cdf723f3a0231ab (diff) | |
Fix non-cpu counter build.
Diffstat (limited to 'sys/dev/lockstat.h')
| -rw-r--r-- | sys/dev/lockstat.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/lockstat.h b/sys/dev/lockstat.h index f6029e8f9bc..80e94f25443 100644 --- a/sys/dev/lockstat.h +++ b/sys/dev/lockstat.h @@ -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, uintptr_t, uintptr_t, #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_ */ |
