summaryrefslogtreecommitdiffstats
path: root/sys/netinet
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/netinet
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/netinet')
-rw-r--r--sys/netinet/sctp_syscalls.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/sctp_syscalls.c b/sys/netinet/sctp_syscalls.c
index 3d0f549..3161abc 100644
--- a/sys/netinet/sctp_syscalls.c
+++ b/sys/netinet/sctp_syscalls.c
@@ -94,11 +94,11 @@ sctp_syscalls_init(void *unused __unused)
{
int error;
- error = syscall_helper_register(sctp_syscalls);
+ error = syscall_helper_register(sctp_syscalls, SY_THR_STATIC);
KASSERT((error == 0),
("%s: syscall_helper_register failed for sctp syscalls", __func__));
#ifdef COMPAT_FREEBSD32
- error = syscall32_helper_register(sctp_syscalls);
+ error = syscall32_helper_register(sctp_syscalls, SY_THR_STATIC);
KASSERT((error == 0),
("%s: syscall32_helper_register failed for sctp syscalls",
__func__));
OpenPOWER on IntegriCloud