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: pthread_mutex_unlock when mutex is not locked


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


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