locale.cc (std::locale::classic()): Weaken locking protocol.
authorLoren J. Rittle <ljrittle@acm.org>
Wed, 13 Nov 2002 14:55:32 +0000 (14:55 +0000)
committerLoren J. Rittle <ljrittle@gcc.gnu.org>
Wed, 13 Nov 2002 14:55:32 +0000 (14:55 +0000)
libstdc++/7445
* src/locale.cc (std::locale::classic()): Weaken locking protocol.

From-SVN: r59078

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

index 0565f3755dae04a06d57072e2e93bd792ae27438..f80ab5bc42528572cbc8ac11467deefa8e1f83cd 100644 (file)
@@ -1,3 +1,8 @@
+2002-11-13  Loren J. Rittle  <ljrittle@acm.org>
+
+       libstdc++/7445
+       * src/locale.cc (std::locale::classic()): Weaken locking protocol.
+
 2002-11-13  Jonathan Wakely  <redi@gcc.gnu.org>
 
        * docs/html/install.html, docs/html/22_locale/locale.html: HTML fix.
index 127197d0138f4d3494fc66162e6230735499bda4..46fab2832410f9065357bea185c9522eee9d8d02 100644 (file)
@@ -367,9 +367,7 @@ namespace std
   const locale&
   locale::classic()
   {
-    static _STL_mutex_lock __lock __STL_MUTEX_INITIALIZER;
-    _STL_auto_lock __auto(__lock);
-
+    // Locking protocol: singleton-called-before-threading-starts
     if (!_S_classic)
       {
        try