[ECOS] ramfs problems

Robin Farine robin.farine@acn-group.ch
Thu Feb 14 05:57:00 GMT 2002


On Thu, 2002-02-14 at 12:27, Peter Graf wrote:

[snip]

> 
> 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.
> 

Yes, Jifl fixed it. Check that you have the latest version of
"packages/language/c/libc/stdio/[version]/src/common/fflush.cxx". If the
fix isn't in the public CVS repository then tell me and I'll send you a
diff privately.

> 
> Bye, Peter
> 

Robin



-- 
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