diff options
author | andre <andre@FreeBSD.org> | 2006-02-16 15:40:36 +0000 |
---|---|---|
committer | andre <andre@FreeBSD.org> | 2006-02-16 15:40:36 +0000 |
commit | 201a4f94009c982484911945dd073976fcbc30b6 (patch) | |
tree | 1cf7bcf54161058ad8b1b8ccb3e5e20521c58e33 /sys/netinet/tcp_timer.c | |
parent | 1372d441b5f58d5f1595729e8d1cdbbf98cf4cd7 (diff) | |
download | FreeBSD-src-201a4f94009c982484911945dd073976fcbc30b6.zip FreeBSD-src-201a4f94009c982484911945dd073976fcbc30b6.tar.gz |
Make sysctl_msec_to_ticks(SYSCTL_HANDLER_ARGS) generally available instead
of being private to tcp_timer.c.
Sponsored by: TCP/IP Optimization Fundraise 2005
MFC after: 3 days
Diffstat (limited to 'sys/netinet/tcp_timer.c')
-rw-r--r-- | sys/netinet/tcp_timer.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/sys/netinet/tcp_timer.c b/sys/netinet/tcp_timer.c index 9726f67..b9d24a8 100644 --- a/sys/netinet/tcp_timer.c +++ b/sys/netinet/tcp_timer.c @@ -63,26 +63,6 @@ #include <netinet/tcp_debug.h> #endif -static int -sysctl_msec_to_ticks(SYSCTL_HANDLER_ARGS) -{ - int error, s, tt; - - tt = *(int *)oidp->oid_arg1; - s = (int)((int64_t)tt * 1000 / hz); - - error = sysctl_handle_int(oidp, &s, 0, req); - if (error || !req->newptr) - return (error); - - tt = (int)((int64_t)s * hz / 1000); - if (tt < 1) - return (EINVAL); - - *(int *)oidp->oid_arg1 = tt; - return (0); -} - int tcp_keepinit; SYSCTL_PROC(_net_inet_tcp, TCPCTL_KEEPINIT, keepinit, CTLTYPE_INT|CTLFLAG_RW, &tcp_keepinit, 0, sysctl_msec_to_ticks, "I", ""); |