aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/counter.h
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2013-10-15 10:05:37 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2013-10-15 10:05:37 +0000
commit511b5fa5909b76210c85f839fe23fc84a65b8647 (patch)
tree8eb06fc56bcf395c1a2e7a6f085ca680ed27a303 /sys/sys/counter.h
parent84c1edcbad7d4cf8db3b026ee1c8adb69423e13b (diff)
downloadsrc-511b5fa5909b76210c85f839fe23fc84a65b8647.tar.gz
src-511b5fa5909b76210c85f839fe23fc84a65b8647.zip
- While we are spreading the counter(9) across network stack, more userland
tools would need to know about the counter_u64_t type. Allow to include sys/counter.h from userspace. - Utilize now defined type in kvm_counter_u64_fetch(). Sponsored by: Netflix Sponsored by: Nginx, Inc.
Notes
Notes: svn path=/head/; revision=256514
Diffstat (limited to 'sys/sys/counter.h')
-rw-r--r--sys/sys/counter.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/sys/counter.h b/sys/sys/counter.h
index ec5cbfe9d36b..2ce7134176f2 100644
--- a/sys/sys/counter.h
+++ b/sys/sys/counter.h
@@ -31,6 +31,7 @@
typedef uint64_t *counter_u64_t;
+#ifdef _KERNEL
#include <machine/counter.h>
counter_u64_t counter_u64_alloc(int);
@@ -58,4 +59,5 @@ uint64_t counter_u64_fetch(counter_u64_t);
for (int i = 0; i < (n); i++) \
counter_u64_zero((a)[i]); \
} while (0)
+#endif /* _KERNEL */
#endif /* ! __SYS_COUNTER_H__ */