summaryrefslogtreecommitdiffstats
path: root/sys/nlm
diff options
context:
space:
mode:
authormjg <mjg@FreeBSD.org>2014-10-26 19:42:44 +0000
committermjg <mjg@FreeBSD.org>2014-10-26 19:42:44 +0000
commita9faac8f4b75a3a8c3d752a2c56e3709438f5a94 (patch)
treedab547b54bf840f54b99e4b2af2ddd062990face /sys/nlm
parent4ee18dab174120853a3d2d38c7745f4b1489ae7b (diff)
downloadFreeBSD-src-a9faac8f4b75a3a8c3d752a2c56e3709438f5a94.zip
FreeBSD-src-a9faac8f4b75a3a8c3d752a2c56e3709438f5a94.tar.gz
Avoid dynamic syscall overhead for statically compiled modules.
The kernel tracks syscall users so that modules can safely unregister them. But if the module is not unloadable or was compiled into the kernel, there is no need to do this. Achieve this by adding SY_THR_STATIC_KLD macro which expands to SY_THR_STATIC during kernel build and 0 otherwise. Reviewed by: kib (previous version) MFC after: 2 weeks
Diffstat (limited to 'sys/nlm')
-rw-r--r--sys/nlm/nlm_prot_impl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/nlm/nlm_prot_impl.c b/sys/nlm/nlm_prot_impl.c
index 74fae87..5f20206 100644
--- a/sys/nlm/nlm_prot_impl.c
+++ b/sys/nlm/nlm_prot_impl.c
@@ -295,7 +295,7 @@ nlm_init(void *dummy)
TAILQ_INIT(&nlm_hosts);
error = syscall_register(&nlm_syscall_offset, &nlm_syscall_sysent,
- &nlm_syscall_prev_sysent);
+ &nlm_syscall_prev_sysent, SY_THR_STATIC_KLD);
if (error)
NLM_ERR("Can't register NLM syscall\n");
else
OpenPOWER on IntegriCloud