This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: No binary semaphore in C API?
Bart Veer wrote:
>
> Arguably the better alternative would be to implement a new mutex
> class which deals with thread groups, rather than overloading
> binary semaphores. The latter could then be left with their existing
> semantics, although people might still be confused and use them
> incorrectly for mutual exclusion.
Why don't we just make a CDL variable controlling which behaviour you get,
with the failsafe assert version the default? That way the behaviour is
implementation defined, not undefined.
Personally I think binary semaphores are a useful paradigm, *complementary*
to other sync primitives. I think it's better to provide a useful toolkit
than try to enforce personal preferences about the way to write
multi-threaded code.
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