
Alexander Terekhov <terekhov@web.de> writes: | Howard Hinnant wrote:
On Jan 27, 2004, at 10:38 AM, Alexander Terekhov wrote:
Martin Taylor wrote:
Hi
I would like to put forward an implementation of a lightweight mutex for MacOS. I have tested it with shared_ptr_mt_test.cpp without problem.
You don't have proper memory barriers for MP-safety. Abusing the scheduler is also not good.
Do you have any specific suggestions which would make this design at least as good as that in lwm_gcc.hpp?
| http://www.boost.org/boost/detail/lwm_gcc.hpp is also broken. Because of the sched_yield or something else? Perhaps the lwm_gcc should just be removed? (and lwm_linux) In the lwm_linux case futexes could be used if new enough glibc and kernel. (OTOH in that case it is likely that pthread's mutex is implement with futex) -- Lgb