[Top][All Lists]

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

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

From: Dale Gary
Subject: Re: [lwip-users] the sequentiality of the lwip stack
Date: Tue, 18 Mar 2014 12:50:05 -0500 (CDT)

One of the things that would help explain what you are asking is the rawapi.txt in the doc folder/directory of the lwip files. It explains
the raw (call back) versus the threaded (socket programming). It would put perspective on what you want to know.

Dale Gary | Software Engineer
Digital Monitoring Products | dmp.com
417.831.9362 ext. 1018 | Fax 417.831.1325

From: "Fabian Koch" <address@hidden>
To: "Mailing list for lwIP users" <address@hidden>
Sent: Tuesday, March 18, 2014 9:49:26 AM
Subject: Re: [lwip-users] the sequentiality of the lwip stack

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.

lwip-users mailing list

reply via email to

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