diff options
author | andre <andre@FreeBSD.org> | 2007-04-11 09:45:16 +0000 |
---|---|---|
committer | andre <andre@FreeBSD.org> | 2007-04-11 09:45:16 +0000 |
commit | bd6041301a0ba459f34d99a6e4e526ebaafc48b0 (patch) | |
tree | db2065ed42263113dca9aaa7ad58c859f3975c57 /sys/netinet/tcp_syncache.c | |
parent | bda6bd3e38175b52aef99a649001fdc4143dfb11 (diff) | |
download | FreeBSD-src-bd6041301a0ba459f34d99a6e4e526ebaafc48b0.zip FreeBSD-src-bd6041301a0ba459f34d99a6e4e526ebaafc48b0.tar.gz |
Change the TCP timer system from using the callout system five times
directly to a merged model where only one callout, the next to fire,
is registered.
Instead of callout_reset(9) and callout_stop(9) the new function
tcp_timer_activate() is used which then internally manages the callout.
The single new callout is a mutex callout on inpcb simplifying the
locking a bit.
tcp_timer() is the called function which handles all race conditions
in one place and then dispatches the individual timer functions.
Reviewed by: rwatson (earlier version)
Diffstat (limited to 'sys/netinet/tcp_syncache.c')
-rw-r--r-- | sys/netinet/tcp_syncache.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index 2a11710..128057b 100644 --- a/sys/netinet/tcp_syncache.c +++ b/sys/netinet/tcp_syncache.c @@ -730,7 +730,7 @@ syncache_socket(struct syncache *sc, struct socket *lso, struct mbuf *m) */ if (sc->sc_rxmits > 1) tp->snd_cwnd = tp->t_maxseg; - callout_reset(tp->tt_keep, tcp_keepinit, tcp_timer_keep, tp); + tcp_timer_activate(tp, TT_KEEP, tcp_keepinit); INP_UNLOCK(inp); |