From: Loren J. Rittle Date: Wed, 4 Dec 2002 22:24:05 +0000 (+0000) Subject: re PR libstdc++/7445 (poor performance of std::locale::classic() in multi-threaded... X-Git-Tag: releases/gcc-3.2.2~214 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=937da96a49a9c59230ac5ec130036b956d9de337;p=thirdparty%2Fgcc.git re PR libstdc++/7445 (poor performance of std::locale::classic() in multi-threaded applications) PR libstdc++/7445 * src/locale.cc (std::locale::classic()): Weaken locking protocol. From-SVN: r59834 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 118e0b73f53b..4476f5b1e4b1 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2002-12-04 Loren J. Rittle + + PR libstdc++/7445 + * src/locale.cc (std::locale::classic()): Weaken locking protocol. + 2002-12-03 Phil Edwards * include/bits/streambuf.tcc (basic_streambuf::sputbackc): Prefix diff --git a/libstdc++-v3/src/locale.cc b/libstdc++-v3/src/locale.cc index 127197d0138f..46fab2832410 100644 --- a/libstdc++-v3/src/locale.cc +++ b/libstdc++-v3/src/locale.cc @@ -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