[ECOS] Nested calls to Mutexes
Bart Veer
bartv@redhat.com
Wed Mar 21 05:29:00 GMT 2001
>>>>> "Rosimildo" == Rosimildo daSilva <rosimildo@hotmail.com> writes:
Rosimildo> Hi, the project I am working on, we have faced a small problem
Rosimildo> with mutexes.
>> From ecos documentation:
Rosimildo> "When a thread locks a mutex it becomes the owner. Only
Rosimildo> the mutex's owner may unlock it. While a mutex remains
Rosimildo> locked, the owner should not lock it again, as the
Rosimildo> behavior is undefined and probably dangerous. "
Rosimildo> I disagree with this statement. It is a *common idiom*
Rosimildo> to have routines that needs to "lock" some access to
Rosimildo> start calling other routines that "locks" the mutex
Rosimildo> again. In any sizeable project, this happens
Rosimildo> eventually. As long as the acquire()/release() calls
Rosimildo> are balanced, it should be no problem.
This issue has been raised before. See e.g.
http://sources.redhat.com/ml/ecos-discuss/2000-06/msg00333.html
and
http://sources.redhat.com/ml/ecos-discuss/2000-08/msg00061.html
There are no plans to change eCos' behaviour in this respect.
Bart
More information about the Ecos-discuss
mailing list