This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Why to signal condvar with mutex held?
- From: Sergei Organov <osv at topconrd dot ru>
- To: sandeep <shimple0 at yahoo dot com>
- Cc: Nick Garnett <nickg at ecoscentric dot com>, ecos-discuss at sources dot redhat dot com
- Date: 14 Dec 2004 12:46:49 +0300
- Subject: Re: [ECOS] Why to signal condvar with mutex held?
- References: <87llcro1eq.fsf@osv.topcon.com> <m3r7mjgvqi.fsf@xl5.calivar.com><41BB181A.8020906@yahoo.com>
sandeep <shimple0@yahoo.com> writes:
> my 2 cents.
>
> what about keeping the waitlists sorted in decreasing priority order of
> threads, when you go with idea of wait morphing? won't this ensure that
> highest priority waiting thread gets the mutex?
As far as I know, priority (as opposed to FIFO) wait queues is a
separate configuration option in eCos, so you can have them even now if
you wish. However, it's not always a good idea to have priority wait
queues as it makes it possible for low priority thread waiting in a
queue to never get executed. In addition, enqueue into the sorted queue
in eCos is slower.
--
Sergei.
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss