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]

Re: Condition Variables recap


"Trenton D. Adams" wrote:
> 
> cyg_mutex_trylock () is not documented in my documentation.  I assume
> I'm not required to call that before the actual locking?

Curiously that is true. I'll make a note to fix that.

Gary Thomas wrote:
> The difference between cyg_cond_signal() and cyg_cond_broadcast() is
> that with the former at most one thread waiting on the condition
> variable will be awakened. 

You mean "at least", not "at most". cyg_cond_signal() may wake up more than
one thread (which is the norm for CV implementations, not just eCos).
That's why you should always loop and retest the condition when doing a
cyg_cond_wait().

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine
Come to the Red Hat TechWorld open source conference in Brussels!
Keynotes, techie talks and exhibitions    http://www.redhat-techworld.com/


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