Change TCP_TMR_INTERVAL from 100 to 250ms.

tcp_fasttmr() and tcp_slowtmr() call frequencies should remain unchanged,
but system load will be reduced. Closes patch #1495. Please email me
if you see any issues with this. Non-standard TCP timer definitions in
contrib/ports/v2pro/lwipopts.h might need adjustment as a consequence
of this change.
This commit is contained in:
marcbou
2003-06-19 12:45:32 +00:00
parent 6657b656f5
commit cea3ff9d38
2 changed files with 17 additions and 24 deletions

View File

@@ -106,18 +106,11 @@ tcp_init(void)
void
tcp_tmr(void)
{
++tcp_timer;
if (tcp_timer == 10) {
tcp_timer = 0;
}
if (tcp_timer & 1) {
/* Call tcp_fasttmr() every 200 ms, i.e., every other timer
tcp_tmr() is called. */
tcp_fasttmr();
}
if (tcp_timer == 0 || tcp_timer == 5) {
/* Call tcp_slowtmr() every 500 ms, i.e., every fifth timer
/* Call tcp_fasttmr() every 250 ms */
tcp_fasttmr();
if (++tcp_timer & 1) {
/* Call tcp_tmr() every 500 ms, i.e., every other timer
tcp_tmr() is called. */
tcp_slowtmr();
}
@@ -626,7 +619,7 @@ tcp_slowtmr(void)
/*
* tcp_fasttmr():
*
* Is called every TCP_FINE_TIMEOUT (100 ms) and sends delayed ACKs.
* Is called every TCP_FAST_INTERVAL (250 ms) and sends delayed ACKs.
*/
/*-----------------------------------------------------------------------------------*/
void