From a9faac8f4b75a3a8c3d752a2c56e3709438f5a94 Mon Sep 17 00:00:00 2001 From: mjg Date: Sun, 26 Oct 2014 19:42:44 +0000 Subject: 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 --- sys/nlm/nlm_prot_impl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/nlm') 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 -- cgit v1.1