diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 4fa6859a460..d98e25b5ef6 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,9 @@ +2004-01-07 Loren J. Rittle + + (re-open) PR libstdc++/12658 + * src/locale_init.cc (locale::locale): Remove ill-scoped mutex. + (locale::global): Likewise. + 2004-01-07 Paolo Carlini * testsuite/27_io/basic_istream/extractors_other/char/9318-in.cc: diff --git a/libstdc++-v3/src/locale_init.cc b/libstdc++-v3/src/locale_init.cc index 2fd22f6f01b..2eb45c85e4c 100644 --- a/libstdc++-v3/src/locale_init.cc +++ b/libstdc++-v3/src/locale_init.cc @@ -97,26 +97,20 @@ namespace std locale::locale() throw() { _S_initialize(); - __glibcxx_mutex_define_initialized(lock); - __glibcxx_mutex_lock(lock); _S_global->_M_add_reference(); _M_impl = _S_global; - __glibcxx_mutex_unlock(lock); } locale locale::global(const locale& __other) { _S_initialize(); - __glibcxx_mutex_define_initialized(lock); - __glibcxx_mutex_lock(lock); _Impl* __old = _S_global; __other._M_impl->_M_add_reference(); _S_global = __other._M_impl; if (_S_global->_M_check_same_name() && (std::strcmp(_S_global->_M_names[0], "*") != 0)) setlocale(LC_ALL, __other.name().c_str()); - __glibcxx_mutex_unlock(lock); // Reference count sanity check: one reference removed for the // subsition of __other locale, one added by return-by-value. Net