lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] tcp_enqueue problem, using socket:


From: Jonathan Larmour
Subject: Re: [lwip-users] tcp_enqueue problem, using socket:
Date: Thu, 20 Mar 2008 15:50:58 +0000
User-agent: Thunderbird 1.5.0.12 (X11/20070530)

Bill Auerbach wrote:
>> Not before 1.3.0 sorry. It's just too close. It's easy to make the first
>> write non-blocking, but to allow subsequent ones to be non-blocking before
>> the first write's data is completely sent would require being able to
>> store
>> a list of pending writes. I don't think the implementation would be
>> meaningful until the code does that.
> 
> This is what I had to do.
> 
>> Alternatively you could use the raw API instead, but obviously that would
>> be quite a change for you.
> 
> Would the test I proposed yesterday work if used before calling lwip_send
> work?

Not if you want to use select.

>  Of course the program now has to handle the case of what to do if it
> would block, but the blocking call could be avoided.  It means the socket
> layer has to dig into the pcb struct, but there really isn't a choice if the
> test is to be made.

Certainly there's a thread safety issue. The value could be mid-update in a
different thread. This would be unreliable.

Jifl
-- 
eCosCentric Limited      http://www.eCosCentric.com/     The eCos experts
 **  Visit us at ESC Silicon Valley <http://www.embedded.com/esc/sv>  **
 **  April 15-17 2008, Booth 3012, San Jose McEnery Convention Center **
Barnwell House, Barnwell Drive, Cambridge, UK.       Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.
------["Si fractum non sit, noli id reficere"]------       Opinions==mine




reply via email to

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