lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] tcp_slowtmr and tcp_fasttmr


From: Jonathan Larmour
Subject: Re: [lwip-users] tcp_slowtmr and tcp_fasttmr
Date: Sat, 02 Feb 2008 22:59:35 +0000
User-agent: Mozilla Thunderbird 1.0.8-1.1.fc4 (X11/20060501)

Julian Gardner [RSD] wrote:

tcp_slowtmr
tcp_fasttmr

Which ones do i need to call in my loop, as i have noticed that tcp_tmr calls the slow time but nothing calls the fast timer, do we still need to call the fast timer?

tcp_tmr() calls both!

From core/tcp.c:

void
tcp_tmr(void)
{
  /* 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();
  }
}

also how do people implement the calls to check for the link being up/down, what kind of rate do you check this?

On some hardware the PHY has an interrupt associated with it.

Jifl
--
eCosCentric Limited      http://www.eCosCentric.com/     The eCos experts
Barnwell House, Barnwell Drive, Cambridge, UK.       Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.
------["The best things in life aren't things."]------      Opinions==mine




reply via email to

[Prev in Thread] Current Thread [Next in Thread]