OSDN Git Service

(re-open) PR libstdc++/12658
authorljrittle <ljrittle@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 7 Jan 2004 17:40:45 +0000 (17:40 +0000)
committerljrittle <ljrittle@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 7 Jan 2004 17:40:45 +0000 (17:40 +0000)
* src/locale_init.cc (locale::locale): Remove ill-scoped mutex.
(locale::global): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@75509 138bc75d-0d04-0410-961f-82ee72b054a4

libstdc++-v3/ChangeLog
libstdc++-v3/src/locale_init.cc

index 4fa6859..d98e25b 100644 (file)
@@ -1,3 +1,9 @@
+2004-01-07  Loren J. Rittle  <ljrittle@acm.org>
+
+       (re-open) PR libstdc++/12658
+       * src/locale_init.cc (locale::locale): Remove ill-scoped mutex.
+       (locale::global): Likewise.
+
 2004-01-07  Paolo Carlini  <pcarlini@suse.de>
 
        * testsuite/27_io/basic_istream/extractors_other/char/9318-in.cc:
index 2fd22f6..2eb45c8 100644 (file)
@@ -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