Hi Thomas, On Wed, Mar 06, 2013 at 06:43:15AM -0800, ThomasJ wrote: > Hi > > Just an idea... and would it work? > > If I keep my TX task and RX task. > I then make make sure the TXTask does not use the netconn_write while the > RXTask is in the netconn_recv call. > Would that be ok or must the net connection be handle only by the same task?
I already told you about that. This is exactly the same thing from the lwIP point of view or generally speaking for any multithreading environment, this is not strictly lwIP-specific. The point is that netconn_ functions are not reentrant for -a- UDP or TCP control block, so serializing them through a mutex/semaphore from sparse threads will work. But beware of dead locks conditions!, you are going to run a mutex/semaphore over a message passing system which of course cause contexts switchs (so priority reordering), this requires strict checking of any possible locking cases between 3 threads, a mutex/semaphore, and a mbox. Sylvain _______________________________________________ lwip-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/lwip-users
