summaryrefslogtreecommitdiffstats
path: root/sys/sys/pmckern.h
diff options
context:
space:
mode:
authorjkoshy <jkoshy@FreeBSD.org>2005-07-30 09:02:42 +0000
committerjkoshy <jkoshy@FreeBSD.org>2005-07-30 09:02:42 +0000
commit05d42812accd5edbfe95a06af05eae531959c220 (patch)
treeb1d2d227bd805153039236ff8b34d8b262c0d401 /sys/sys/pmckern.h
parentc32a4bcef8c9039472ca54161264c3ffa3289810 (diff)
downloadFreeBSD-src-05d42812accd5edbfe95a06af05eae531959c220.zip
FreeBSD-src-05d42812accd5edbfe95a06af05eae531959c220.tar.gz
Fail the module loading process if the currently executing kernel
was not compiled with 'options HWPMC_HOOKS' or if the compiled-in version numbers of the kernel and module are out of sync. Reported by: cracauer MFC after: 3 days
Diffstat (limited to 'sys/sys/pmckern.h')
-rw-r--r--sys/sys/pmckern.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/sys/pmckern.h b/sys/sys/pmckern.h
index 0d689b2..d489fe6 100644
--- a/sys/sys/pmckern.h
+++ b/sys/sys/pmckern.h
@@ -62,6 +62,9 @@ extern volatile cpumask_t pmc_cpumask;
/* Count of system-wide sampling PMCs in existence */
extern volatile int pmc_ss_count;
+/* kernel version number */
+extern const int pmc_kernel_version;
+
/* Hook invocation; for use within the kernel */
#define PMC_CALL_HOOK(t, cmd, arg) \
do { \
OpenPOWER on IntegriCloud