Define all TCP timers in terms of PRT timers.
This commit is contained in:
parent
a16907a94d
commit
dc49b0342e
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: tcp_timer.c,v 1.36 1998/05/06 01:21:23 thorpej Exp $ */
|
||||
/* $NetBSD: tcp_timer.c,v 1.37 1998/05/07 01:30:46 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
|
||||
@ -163,7 +163,7 @@ tcp_slowtimo()
|
||||
if (tp == 0 || tp->t_state == TCPS_LISTEN)
|
||||
continue;
|
||||
for (i = 0; i < TCPT_NTIMERS; i++) {
|
||||
if (TCP_TIMER_ISFIRING(tp, i)) {
|
||||
if (TCP_TIMER_ISEXPIRED(tp, i)) {
|
||||
(void) tcp_usrreq(tp->t_inpcb->inp_socket,
|
||||
PRU_SLOWTIMO, (struct mbuf *)0,
|
||||
(struct mbuf *)i, (struct mbuf *)0,
|
||||
@ -189,7 +189,7 @@ tpgone:
|
||||
#endif
|
||||
tcp_now++; /* for timestamps */
|
||||
if (++syn_cache_last >= tcp_syn_cache_interval) {
|
||||
syn_cache_timer(syn_cache_last);
|
||||
syn_cache_timer();
|
||||
syn_cache_last = 0;
|
||||
}
|
||||
splx(s);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: tcp_timer.h,v 1.8 1998/05/06 01:24:38 thorpej Exp $ */
|
||||
/* $NetBSD: tcp_timer.h,v 1.9 1998/05/07 01:30:46 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1993
|
||||
@ -120,14 +120,13 @@ char *tcptimers[] =
|
||||
PRT_SLOW_ARM((tp)->t_timer[(timer)], (nticks))
|
||||
|
||||
#define TCP_TIMER_DISARM(tp, timer) \
|
||||
(tp)->t_timer[(timer)] = 0
|
||||
PRT_SLOW_DISARM((tp)->t_timer[(timer)])
|
||||
|
||||
#define TCP_TIMER_ISARMED(tp, timer) \
|
||||
((tp)->t_timer[(timer)] != 0)
|
||||
PRT_SLOW_ISARMED((tp)->t_timer[(timer)])
|
||||
|
||||
#define TCP_TIMER_ISFIRING(tp, timer) \
|
||||
(TCP_TIMER_ISARMED((tp), (timer)) && \
|
||||
PRT_SLOW_ISEXPIRED((tp)->t_timer[(timer)]))
|
||||
#define TCP_TIMER_ISEXPIRED(tp, timer) \
|
||||
PRT_SLOW_ISEXPIRED((tp)->t_timer[(timer)])
|
||||
|
||||
/*
|
||||
* Force a time value to be in a certain range.
|
||||
|
Loading…
Reference in New Issue
Block a user