lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Socket read/write and threads


From: address@hidden
Subject: Re: [lwip-users] Socket read/write and threads
Date: Mon, 11 Jan 2010 17:08:13 +0100
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0

Yoav Nissim wrote:
I wonder though - if these locks were taken care of, reading and writing
to a single socket could be simultaneous but, would lwIP be full duplex
'on the wire' as you've said?
Well, that depends on your MAC, of course: If you have a DMA-enabled MAC where you can queue multiple packets, there's no limitation to full duplex. Even with the current mutual exclusion of read and write, you will get full duplex to some extent. However, if you try to write more than can be enqueued in the internal buffers, the write will block out read until there is more space again, which would be solved when having different locks for read and write (i.e. no mutual exclusion: read could be executed while write waits for more buffer space to become available).

As we said, it might take us away from being lightweight. However, if someone has an easy fix for this, it might be worth to try...

Simon




reply via email to

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