On Mon, Sep 17, 2012 at 11:17 AM, Liviu Nicoara <nikko...@hates.ms> wrote: > I hope you agree that this synchronization is sufficient for the facet > initialization and reading of facet data.
I have reduced the number of reported race conditions in 22.locale.numpunct.mt from 12440: http://s247136804.onlinehome.us/stdcxx-1056-SPARC-20120917/22.locale.numpunct.mt.nts.1.er.html/index.html to 288: http://s247136804.onlinehome.us/stdcxx-1056-20120918/22.locale.numpunct.mt.5.er.html/index.html The changes are in the following files: http://s247136804.onlinehome.us/stdcxx-1056-20120918/facet.cpp http://s247136804.onlinehome.us/stdcxx-1056-20120918/punct.cpp _numpunct.h looks like this: http://s247136804.onlinehome.us/stdcxx-1056-20120918/_numpunct.h With these changes, no races conditions are repoted for any of the functions in std::numpunct<T>. Still, there are 288 race conditions being reported in __rw_locale::__rw_locale and in std::locale::_C_get_facet. We need to identify the source and cause of these race conditions and correct them as well. This is not a complete solution to the problem, because we still have to re-write the chunk of code I eliminated from facet.cpp. It is only step one towards finding a real solution. But, at least for now, we have pinpointed where the source of these race conditions is located, and what causing it. The test program was run as: ./22.locale.numpunct.mt --nthreads=8 --nloops=10000. More to follow. --Stefan -- Stefan Teleman KDE e.V. stefan.tele...@gmail.com