diff options
-rw-r--r-- | libstdc++-v3/ChangeLog | 7 | ||||
-rw-r--r-- | libstdc++-v3/src/locale_init.cc | 9 |
2 files changed, 11 insertions, 5 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 8e46102..12a415f 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,4 +1,11 @@ 2004-07-29 Paolo Carlini <pcarlini@suse.de> + Petur Runolfsson <peturr02@ru.is> + + PR libstdc++/12658 (continued) + * src/locale_init.cc (locale::locale, locale::global): Use + a single locale_mutex instead of two separate mutexes. + +2004-07-29 Paolo Carlini <pcarlini@suse.de> PR libstdc++/16813 * include/debug/map.h (insert(_InputIterator, _InputIterator)): diff --git a/libstdc++-v3/src/locale_init.cc b/libstdc++-v3/src/locale_init.cc index 35dc361..fafe03a 100644 --- a/libstdc++-v3/src/locale_init.cc +++ b/libstdc++-v3/src/locale_init.cc @@ -89,9 +89,8 @@ namespace __gnu_internal extern std::__timepunct_cache<wchar_t> timepunct_cache_w; #endif - // Mutex objects for locale initialization. - __glibcxx_mutex_define_initialized(locale_cons_mutex); - __glibcxx_mutex_define_initialized(locale_global_mutex); + // Mutex object for locale initialization. + __glibcxx_mutex_define_initialized(locale_mutex); } // namespace __gnu_internal namespace std @@ -101,7 +100,7 @@ namespace std locale::locale() throw() : _M_impl(0) { _S_initialize(); - __gnu_cxx::lock sentry(__gnu_internal::locale_cons_mutex); + __gnu_cxx::lock sentry(__gnu_internal::locale_mutex); _S_global->_M_add_reference(); _M_impl = _S_global; } @@ -112,7 +111,7 @@ namespace std _S_initialize(); _Impl* __old; { - __gnu_cxx::lock sentry(__gnu_internal::locale_global_mutex); + __gnu_cxx::lock sentry(__gnu_internal::locale_mutex); __old = _S_global; __other._M_impl->_M_add_reference(); _S_global = __other._M_impl; |