lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Are recv/send/write reentrant if LWIP_NETCONN_FULLDUPLE


From: address@hidden
Subject: Re: [lwip-users] Are recv/send/write reentrant if LWIP_NETCONN_FULLDUPLEX enabled?
Date: Wed, 17 Nov 2021 21:58:55 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.3.1

Am 17.11.2021 um 18:16 schrieb Grant Edwards:
My (newly generated 2.1.3) documentation says that
LWIP_NETCONN_FULLDUPLEX "allows reading from one thread, writing from
a 2nd thread and closing from a 3rd thread". [And the "really alpha"
statement is indeed gone.]

I assume that does not imply that recv/send/write are renntrant such
that two threads could write to a socket/netconn at the same time? Two
sockets reading at the same time is less common, but would be another
example.

This situation doesn't really make much sense for TCP, but I have seen
applications where it is done for UDP and raw Ethernet.

I'd have to re-check the sources, but it should not be a problem for UDP
and raw I guess (as long as CORE_LOCKING is enabled): the problems
mainly come from TCP writes that can't be executed in one batch (so
you'll have to wait for more window or buffers being available). UDP TX
is lock, send, unlock, so that should work. And if it doesn't, it should
be easy to fix.

Regards,
Simon



reply via email to

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