diff options
author | Marcel Moolenaar <marcel@FreeBSD.org> | 2011-10-29 01:26:36 +0000 |
---|---|---|
committer | Marcel Moolenaar <marcel@FreeBSD.org> | 2011-10-29 01:26:36 +0000 |
commit | 056f0ec75543a86131bd9afb7e33f1404c451101 (patch) | |
tree | ff89e0d6181e2a275e009bec9b7543d743a73566 | |
parent | 06842f4c3ed1c8d89af9f2e0cc122eefaa8274b5 (diff) | |
download | src-056f0ec75543a86131bd9afb7e33f1404c451101.tar.gz src-056f0ec75543a86131bd9afb7e33f1404c451101.zip |
Define systrace_probe_func in subr_syscall.c where it's used, instead
of defining it in MD code. This eliminates porting to other architectures.
Notes
Notes:
svn path=/head/; revision=226893
-rw-r--r-- | sys/amd64/amd64/trap.c | 7 | ||||
-rw-r--r-- | sys/i386/i386/trap.c | 7 | ||||
-rw-r--r-- | sys/kern/subr_syscall.c | 9 |
3 files changed, 9 insertions, 14 deletions
diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c index 9c72a693a0a4..29987da31a6a 100644 --- a/sys/amd64/amd64/trap.c +++ b/sys/amd64/amd64/trap.c @@ -104,13 +104,6 @@ dtrace_trap_func_t dtrace_trap_func; dtrace_doubletrap_func_t dtrace_doubletrap_func; /* - * This is a hook which is initialised by the systrace module - * when it is loaded. This keeps the DTrace syscall provider - * implementation opaque. - */ -systrace_probe_func_t systrace_probe_func; - -/* * These hooks are necessary for the pid, usdt and fasttrap providers. */ dtrace_fasttrap_probe_ptr_t dtrace_fasttrap_probe_ptr; diff --git a/sys/i386/i386/trap.c b/sys/i386/i386/trap.c index 5006f41be1ec..c19846bd6baf 100644 --- a/sys/i386/i386/trap.c +++ b/sys/i386/i386/trap.c @@ -113,13 +113,6 @@ dtrace_trap_func_t dtrace_trap_func; dtrace_doubletrap_func_t dtrace_doubletrap_func; /* - * This is a hook which is initialised by the systrace module - * when it is loaded. This keeps the DTrace syscall provider - * implementation opaque. - */ -systrace_probe_func_t systrace_probe_func; - -/* * These hooks are necessary for the pid, usdt and fasttrap providers. */ dtrace_fasttrap_probe_ptr_t dtrace_fasttrap_probe_ptr; diff --git a/sys/kern/subr_syscall.c b/sys/kern/subr_syscall.c index bba44794cefb..f9689a0bf91b 100644 --- a/sys/kern/subr_syscall.c +++ b/sys/kern/subr_syscall.c @@ -52,6 +52,15 @@ __FBSDID("$FreeBSD$"); #endif #include <security/audit/audit.h> +#ifdef KDTRACE_HOOKS +/* + * This is a hook which is initialised by the systrace module + * when it is loaded. This keeps the DTrace syscall provider + * implementation opaque. + */ +systrace_probe_func_t systrace_probe_func; +#endif + static inline int syscallenter(struct thread *td, struct syscall_args *sa) { |