This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: ramfs problems
- From: Robin Farine <robin dot farine at acn-group dot ch>
- To: Peter Graf <p dot graf at itknet dot de>
- Cc: eCos users <ecos-discuss at sources dot redhat dot com>
- Date: 14 Feb 2002 14:47:07 +0100
- Subject: Re: [ECOS] ramfs problems
- References: <3.0.5.32.20020214122707.00902e70@192.168.128.220>
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