[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: address@hidden
Subject: Re: [lwip-users] the sequentiality of the lwip stack
Date: Tue, 18 Mar 2014 21:51:50 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

Fabian Koch wrote:
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.

There are multiple issues:
- When an application thread makes a socket call, it issues a function call in the tcpip-thread and waits for it to complete. This uses a semaphore, which only exists once where multiple semaphores would be needed when multiple threads could call for one socket at once. - A different issue is that the socket/netconn contains a state which could get confused when reading, writing and closing is done concurrently. - Next, when closing a socket, we would have to make sure all threads blocking on this socket (reading, writing) would get unblocked with an error code and that closing is not executed simultaneously more than once (when it needs some time).

I'm not saying it can't be done, but from the lines above, it's clear that it would increase the footprint, which would have to be prevented when not needed.


reply via email to

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