lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] multithreaded app ...


From: Teratux
Subject: Re: [lwip-users] multithreaded app ...
Date: Tue, 22 Jun 2010 10:41:24 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100423 Thunderbird/3.0.4

I think the problem goes a bit farther. netconn_recv blocks waiting for a connection. Even if I use a mutex to exclude between the threads that write and read, how can I use netconn_recv in a way that it doesn't block if there's no one sending on the other end ?? Is there anything like a timeout for the netconn_recv call ??

Thanks ...

On 06/22/10 08:24, Bill Auerbach wrote:
Since this threading problem comes up weekly it seems, would it be a lot of 
effort to add an LWIP_MULTITHREADED option and add the semaphore locks in the 
functions to ensure no reentrancy in lower lwIP code?  I would think 2 simple 
macros that can expand to nothing or semaphore lock/unlocks could be added to 
all of the functions making lower level calls.  Or possibly, call a single 
locking function passing in the function pointer to call after locking.  This 
might be tricky with arguments I know.

Bill

-----Original Message-----
From: address@hidden
[mailto:address@hidden On
Behalf Of Simon Goldschmidt
Sent: Tuesday, June 22, 2010 5:07 AM
To: Mailing list for lwIP users
Subject: Re: [lwip-users] multithreaded app ...


Kesten, Joerg wrote:
Additionally we needed to prevent simultaneous calls to "send" even on
different sockets. We added a mutex in the send function itself ...
This shouldn't be necessary. If it is, there's a bug which should be
fixed. Could you provide more details on what exactly went wrong with
parallel sends from different netconns/sockets?

Simon
--
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01

_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users

_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users




reply via email to

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