Commit c891b860 by Paolo Carlini Committed by Paolo Carlini

PR libstdc++/12658 (continued)

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.

Co-Authored-By: Petur Runolfsson <peturr02@ru.is>

From-SVN: r85301
parent 727d709b
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)):
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment