Subj : Re: Optimization to Jeffrey Richter's COptex (Windows)? To : comp.programming.threads From : Alexander Terekhov Date : Wed Jan 26 2005 02:09 pm Luke Elliott wrote: > > Hi > > I assume most people are familiar with Richter's COptex July 1996 version is busted. January 1998 "release" isn't much better. If you need optimized 'critical section' for Win95/i386 (it doesn't have CAS), try this swap/exchange based beast: http://www.google.de/groups?selm=41276DBB.2023556D%40web.de If you have CAS or LL/LR-SC, http://www.google.de/groups?selm=41C97341.10A67159%40web.de and for recursiveness simply add a TLS/TSD flag: http://www.google.de/groups?selm=408E48E8.D67F1EA5%40web.de regards, alexander. P.S. For posix safety with respect to destruction, use "pimpl" and don't destroy event (reusing it for something that can live with "spurious" wakes on it [e.g. for another "impl" owner mutex] is ok). .