lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] use of static variables in tcp_in.c


From: Siva Velusamy
Subject: Re: [lwip-users] use of static variables in tcp_in.c
Date: Thu, 4 Oct 2007 09:53:52 -0700



On 10/4/07, Goldschmidt Simon <address@hidden> wrote:

> tcp_in.c in lwIP 1.2.0 makes use of static global variables to pass
> arguments between functions. This implies that tcp_input is not
re-entrant.
> However this doesn't seem to be documented in ethernetif.c or anywhere
else.
> Is there something I'm missing here?

Does it have to be documented in ethernetif.c? Why would you call
tcp_input
more than once? That would mean you would call tcp_input (or maybe
netif->input)
from your netif->output function (which may be called in tcp_input).
That is
not allowed in RAW mode (API mode puts that packet on a queue only, so
the function
is not really called again). This is documented, for example in
loopif.c. Maybe
it should be documented better...


Thanks, that is correct. I've only seen tcp_output being called, for instance, from a timer context (tcp_tmr) and from tcp context. Thanks for the clarification.

-Siva

reply via email to

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