lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Socket API thread safe?


From: Leon Woestenberg
Subject: Re: [lwip-users] Socket API thread safe?
Date: Tue, 08 Jun 2004 15:57:05 +0200
User-agent: Mozilla Thunderbird 0.5 (Windows/20040207)

Hello Wilfred,

Wilfred Hoogerbrugge wrote:
>
As the subject already shows I wonder if the lwIP socket API is multi thread
safe.

This is a recurring topic (and rightly so).

lwIP socket API is *not* multi-threaded safe in the *generic* sense, i.e. for a full-pre-emptive environment (this is as far as I know).

The practical answer. It depends however on your operating system and your implementation of the sysarch.c layer whether your lwIP system
is thread-safe.

As I’m hunting a race condition in my environment using lwIP + socket API, I
wonder if the problem my lay in the fact I’ve two threads calling the socket
API (one for sending using sendto and one for receiving using recvfrom).

I already found out that the sys_sem_wait() function sys.c is sometimes
re-entered (about once a hour), which it doesn’t seem to be designed for
(?).

I think you may need to add debug and/or tracing statements and then stress test the system trying to reproduce the situation.

Regards,

Leon.




reply via email to

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