This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: pthread_mutex_unlock when mutex is not locked
Ok, I agree.
Sergei Organov wrote:
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.
--
______________________________________________________________
RubÃn Israel PÃrez de Aranda Alonso
SIDSA - Semiconductores InvestigaciÃn y DiseÃo S.A.
Parque TecnolÃgico de Madrid Phone : +34 91 803 5052
C/ Torres Quevedo, n 1 Fax: +34 91 803 9557
28760 TRES CANTOS (Madrid) (SPAIN)
e-mail: rperez@sidsa.com www.sidsa.com
______________________________________________________________
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss