lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] the sequentiality of the lwip stack


From: Fabian Koch
Subject: Re: [lwip-users] the sequentiality of the lwip stack
Date: Tue, 18 Mar 2014 15:49:26 +0100

Hey all,

> What I am not sure about is about multi-threading. I know that LWIP
> runs well in a single thread (as I already used), but what I am
> unsure about is if I can use different sockets on different threads
> as long as each socket is used only by that thread...
> Can anyone help on this?


As Simon is always saying: sockets can not be accessed from different threads.
Meaning for Sockets s1,s2 and threads t1,t2:
t1 can acces s1 while t2 can access s2.
BUT never can t1 and t2 both access s1 or s2.

I'm still trying to figure out exactly what parts of the LwIP stack stop us from doing that and I would love to get some pointers (from you, Simon?) where there would be work to do to make that work.
Not neccessarily for full-duplex protocols, but especially for things like one thread waiting in accept() and another thread, closing that same socket. I really want that to work and am ready to submit patches for it. Until now it looks like the main problems are in the sys_arch layer which is controlled by the implementer.

Cheers,
Fabian
reply via email to

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