[ECOS] pthread_mutex_unlock when mutex is not locked

Sergei Organov osv@topconrd.ru
Wed Apr 27 13:44:00 GMT 2005


Rubц┐б╘n Pц┐б╘rez de Aranda Alonso <rperez@sidsa.es> writes:
> Ok,
> I understand you explain me. The standard also defines that a mutex
> locked by a thread must be unlocked by the same thread. However,
> many implementations of Pthreads allow use the mutex to signal events
> carring out lock and unlock of the mutex from different threads.

Really? The mutex is invented for what it is in it's name: "MUTual
EXclusion". You definitely can abuse implementation details that make
some code work on some implementations, but isn't it better to use
the right tool instead?

That said, there is nothing wrong with semantic of mutexes in eCos.

-- 
Sergei.


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



More information about the Ecos-discuss mailing list