diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 8e46102abb5a1f4bb8c8537f830e03358bdbe6ba..12a415fe92e6551bafe501eb38feeabc15bd53e3 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,10 @@ +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 diff --git a/libstdc++-v3/src/locale_init.cc b/libstdc++-v3/src/locale_init.cc index 35dc3611a4b03f5364300c58cbe8289bc6db3f1e..fafe03af7abb23f491b51cd7c553c57695323d58 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;