This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
Re: RFC, fix for bogus timeouts in select()
> So what I should look for is(i.e. a bug exists if):
>
> 1. select() sleeps
> 2. data arrives
> 3. thread on which select() executes is starved until after timeout
> expires
> 4. select() wakes up after timeout has expired *and* data has arrived
> 5. select() returns a timeout instead of "data arrived"
>
> I claim the above happens, but I have not provided evidence.
If you can prove that is happening, then this is a bug.
You should be able to prove this with kernel Instrumentation. See
http://ecos.sourceware.org/docs-latest/user-guide/debugging-techniques.html
You are interested in CYG_INSTRUMENT_CONDVAR() and
CYG_INSTRUMENT_THREAD()
You might find packages/kernel/current/host/instr usefull in helping
decrypt the results.
Andrew