This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC, fix for bogus timeouts in select()


On Fri, 2004-10-22 at 10:44, Andrew Lunn wrote:
> Hi Oyvind 
> 
> Did you debug this in detail. I don't see why your fix should help.
> The only thing i could come up with is if selwait.wait() is returning
> 0 when both the condition variable is true and a timeout has
> happened. But looking at the condition variable code i cannot see how
> that would happen.

The patch I wrote is broken. 

I see that I've only caused confusion by attempting to formulate a patch
before the issue had been discussed and I properly understood the
select.cxx code. Sorry.

The important thing is to decide whether the current behaviour of
select() is the desired behaviour.

> Can you explain in detail what is happening and why your fix works for
> you?

This is how I discovered the issue:

- non-blocking reads here...
- select() returns a timeout
- read() returns data, even though select() immediately preceding it
returned a timeout.


> 
>         Thanks
>                 Andrew
-- 
Øyvind Harboe
http://www.zylin.com



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]