This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: cyg_semaphore_post
Robin Farine <robin.farine@acn-group.ch> writes:
> On Mon, 2002-02-11 at 13:38, Stijn Symons wrote:
>
> [snip]
>
> > I'm mapping an API to eCos, the API states that "When any threads are
> > waiting on the semaphore count to become higher than zero, the thread with
> > the highest priority will be woken up to acquire the semaphore".
>
> .. which in cases of heavy load of the semaphore will lead to
> starvation of low priority threads :-\
>
Indeed.
However there is the CYGIMP_KERNEL_SCHED_SORTED_QUEUES option that
allows all thread queues to be sorted. This was added primarily to
support POSIX, but you can enable it yourself if you want.
--
Nick Garnett, eCos Kernel Architect
Red Hat, Cambridge, UK
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss