Subj : Re: Recursive mutexes To : comp.programming.threads From : notme Date : Thu Mar 24 2005 11:45 am "Chris Thomasson" <_no_damn_spam_cristom@_no_damn_spam.net> escribió en el mensaje news:Ke-dnaV0w7Rlj9_fRVn-qQ@comcast.com... >> I'm trying to implement in C++ a recursive mutex class, because the >> operating >> system doesn't provide one (it only provides ordinary mutexes and >> critical sections) > > CRITICAL_SECTION's are recursive. > > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/entercriticalsection.asp Not in my system. Why you assume I'm using windows? :-) (In fact, AFAIK, windows does support recursive mutexes). No, in my case they're implemented with a semaphore, so calling it twice in a row in the same thread would deadlock. This is an embedded system, and the synchronization support isn't very good. It's quite minimal. This is why I need to do it by myself. Thanks. .