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.
Simon
_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users