lwip-devel
[Top][All Lists]
Advanced

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

Re: [lwip-devel] [patch #8737] tcp_timer_needed should use tcpip_timeout


From: address@hidden
Subject: Re: [lwip-devel] [patch #8737] tcp_timer_needed should use tcpip_timeout
Date: Sat, 12 Sep 2015 14:47:56 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

Robert Szewczyk wrote:
Follow-up Comment #6, patch #8737 (project lwip):

There are two more things worth bringing up:
* Even with the warnings in rawapi.txt about thread safety, a programmer might
lull themselves into a (false) sense of security by thinking: "they warned us
about the thread safety, but they provided these helpful
LOCK_TCPIP_CORE/UNLOCK_TCPIP_CORE, so I'll use those in the 'right' places and
it will be great".  That's the path we pursued.  The particular problem with
tcpip timers was exposed when we tuned the system to minimize the wakeups.

I hought with calling LOCK_TCPIP_CORE(), tpc_timer_needed() should not have to be changed. When not calling it, you're again violating the threading requirements.

* Some functions (as we've discovered recently) are not in the standard API,
and, yet, they do call into tcp_* methods -- the particular function that came
to bite us recently was the dhcp_release, which may ultimately close a
connection.  Perhaps the "proper" solution here would have also been to go
through tcpip_callback.

That's the reason rawapi.txt includes a whitelist of which header files contain funcions hat may be called - the rest is *not* thread-safe.


Simon



reply via email to

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