This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Question about condition variables
- From: NavEcos <ecos at navosha dot com>
- To: Nick Garnett <nickg at ecoscentric dot com>,ecos at navosha dot com
- Cc: "ecos-discuss at sources dot redhat dot com" <ecos-discuss at sources dot redhat dot com>
- Date: Sun, 11 Aug 2002 05:09:43 -0700
- Subject: Re: [ECOS] Question about condition variables
- References: <02081006191102.01101@c1830598-a> <m3znvtr5gb.fsf@ecoscentric.com>
- Reply-to: ecos at navosha dot com
On Sunday 11 August 2002 04:38, Nick Garnett wrote:
> NavEcos <ecos@navosha.com> writes:
> > I was wondering if sombody could tell me why Condition Variables
> > don't instantiate their own mutexes instead of having the user
> > supply one when a CV is instantiated.
> >
> > What was the reasoning behind this?
>
> Because it is often useful to have more than one condition variable
> associated with the same mutex. The different CVs then represent
> different places where threads can wait for changes in the state
> protected by the mutex.
Ah!
That makes perfect sense. Thank you for the reply.
-Rich
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss