This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Question about condition variables


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]