This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Question about condition variables
- From: Nick Garnett <nickg at ecoscentric dot com>
- To: ecos at navosha dot com
- Cc: "ecos-discuss at sources dot redhat dot com" <ecos-discuss at sources dot redhat dot com>
- Date: 11 Aug 2002 12:38:12 +0100
- Subject: Re: [ECOS] Question about condition variables
- References: <02081006191102.01101@c1830598-a>
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.
--
Nick Garnett - eCos Kernel Architect
http://www.eCosCentric.com/
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss