22f Subj : Re: Recursive mutexes To : comp.programming.threads From : Chris Thomasson Date : Tue Mar 29 2005 03:00 pm > This may not be relevant (depending on your OS/hardware) - but the above > will not work on a multi-CPU system. There is no memory barrier op before > the read of m_owner, so a cpu could read an out of date value from its > cache. Yes, you are correct. It was a simple sketch. I believe the barriers would be extra overhead. If the target OS provides fast access to TLS then Alex's simple solution would be better. . 0