]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR libstdc++/7445 (poor performance of std::locale::classic() in multi-threaded...
authorLoren J. Rittle <ljrittle@acm.org>
Wed, 4 Dec 2002 22:24:05 +0000 (22:24 +0000)
committerLoren J. Rittle <ljrittle@gcc.gnu.org>
Wed, 4 Dec 2002 22:24:05 +0000 (22:24 +0000)
PR libstdc++/7445
* src/locale.cc (std::locale::classic()): Weaken locking protocol.

From-SVN: r59834

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

index 118e0b73f53bcd440c6f0c8d81e050243e287169..4476f5b1e4b137097de8435c930d15425bb72402 100644 (file)
@@ -1,3 +1,8 @@
+2002-12-04  Loren J. Rittle  <ljrittle@acm.org>
+
+       PR libstdc++/7445
+       * src/locale.cc (std::locale::classic()): Weaken locking protocol.
+
 2002-12-03  Phil Edwards  <pme@gcc.gnu.org>
 
        * include/bits/streambuf.tcc (basic_streambuf::sputbackc):  Prefix
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