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: cyg_cond_t or cyg_semaphore_t


<maillist@ing-monteleone.com> writes:

> I have some confusion about the use of Cyg_cond_varable_t or
> cyg_semaphore_t. I cannot see a real difference from high-level
> point of view ....
> 
> Someone can explain to me the real differences ?

Semaphores are a stand-alone synchronization mechanism.

Condition variables are part of a synchronization mechanism that also
includes mutexes. Essentially they allow a thread that owns a mutex to
put itself to sleep and release the mutex atomically. Not something
you could do any other way.

-- 
Nick Garnett                                     eCos Kernel Architect
http://www.ecoscentric.com                The eCos and RedBoot experts


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


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