[ECOS] Starvation in cyg_libc_stdio_flush_all_but()?
Robin Farine
acnrf@dial.eunet.ch
Mon Dec 3 01:28:00 GMT 2001
Hi,
Under some circumstances, my application's UI freezes but background threads
still run. The following scenario causes it to happen:
1. Two threads; one, called CLI, handles the command line interface. The
second, say WRK, does some work and prints messages to the console.
2. priority(CLI) > priority(WRK) (higher priority, not higher value)
3. While WRK is printing a message to stdout, the user hits RETURN which
causes the CLI thread to wake up and display a prompt to stderr. This ends
in cyg_libc_stdio_flush_all_but() with the CLI thread looping endlessly
trying to flush stdout since WRK owns stdout stream's lock and cannot
release it because of its lower priority.
Did anyone already have this problem? Do the current CVS sources fix it?
Thanks,
Robin
More information about the Ecos-discuss
mailing list