[ECOS] No binary semaphore in C API?

Jonathan Larmour jlarmour@redhat.com
Wed Mar 28 10:01:00 GMT 2001


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



More information about the Ecos-discuss mailing list