[Top][All Lists]

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

Re: [lwip-users] lwip APIs in a multithreaded enviroment

From: Sylvain Rochet
Subject: Re: [lwip-users] lwip APIs in a multithreaded enviroment
Date: Mon, 4 May 2015 21:26:06 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Hello Daniel,

On Mon, May 04, 2015 at 03:16:13PM +0000, Lunkewitz, Daniel wrote:
> Dear Community,
> we operate a webserver, a modbus client and an UDP broadcaster in our 
> FreeRTOS application. Each service uses its own thread. The webserver 
> uses the netconn API. Both, the modbus client and the UDP broadcaster 
> use raw API.
> We stumbled upon this information: "The lwIP core isn't thread safe. 
> If we have to use lwIP in a multithread environment, we should (or 
> HAVE TO) use "upper" API layers (netconn or sockets). When using raw 
> API you need to protect yourself the core." - 
> http://lwip.wikia.com/wiki/LwIP_and_multithreading
> Is it safe to use lwip the way we do?

No, absolutely not.

> What does it mean to protect the core?

You have to use Netconn or Socket API.

> Strangely enough, the example project our modbus client is based on 
> ("freemodbus-v1.5.0\demo\STR71XTCP" from 
> http://sourceforge.net/projects/freemodbus.berlios/files/freemodbus-v1.5.0.zip)
> also uses raw API and seems to run its own thread.

They are doing it wrong. period.


Attachment: signature.asc
Description: Digital signature

reply via email to

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