Subj : Re: recursive mutexes To : comp.programming.threads From : Peter Dimov Date : Sun May 15 2005 06:22 pm Uenal Mutlu wrote: > "David Schwartz" wrote >> Yes, it can and must know that it already has the lock. A >> function that operates on X should be defined as being called with X >> locked, or with X unlocked. It could even take a boolean that >> indicates whether the caller has locked the object or not, though >> this is rarely the right thing to do. > > You are unnecessarily complicating things and make the program > slower by doing these testings. No, he's in fact making the program faster. .