lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Calling socket interface - which thread to use?


From: Kieran Mansley
Subject: Re: [lwip-users] Calling socket interface - which thread to use?
Date: Tue, 01 Aug 2006 13:24:16 +0100

On Tue, 2006-08-01 at 12:55 +0100, Wilson, Clive wrote:
> Hello,
> 
> I have a multi-threaded LwIP app that uses the socket interface (write
> (), read() etc). I'm using the PPP network interface, so I have ppp
> thread, tcpip thread, and my app thread. I'm not 100% sure whether it
> is important for the socket api to be called from any particular
> thread, or if there is a thread interface that takes care of that. My
> hunch is that I can make the socket calls from within the app thread
> and the api looks after passing the data to the tcpip thread.
> 
> Does anyone have a view on this?

I think that is correct.  If you had more than one application thread,
you would need to serialise access to your sockets so that you didn't
have more than one thread using the stack at the same time.

Kieran





reply via email to

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