[ECOS] ramfs problems

Peter Graf p.graf@itknet.de
Thu Feb 14 03:27:00 GMT 2002

Hi Robin,

>Don't know if it's related but did you apply this fix to fread.cxx?
>  http://sources.redhat.com/ml/ecos-discuss/2002-02/msg00120.html

This has immediately fixed this ramfs problem!

Thanks a lot for your kind help!!!

What remains is the other problem, that a thread blocked by fgetc() on
serial line causes lockup of fread() access on ramfs by another thread.

I remember an earlier problem that came from the conjunction of
Cyg_StdioStream::refill_read_buffer() and cyg_libc_stdio_flush_all_but().
The former routine locks the stream and calls cyg_stdio_read() which blocks
on a condition variable, waiting for characters coming from the underlying
device. Then, the other thread calls something that implies
cyg_libc_stdio_flush_all_but() which spins trying to flush the other
(locked) stream. IIRC fread() implies cyg_libc_stdio_flush_all_but(), so
that would explain it.

Bye, Peter

Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

More information about the Ecos-discuss mailing list