locale.cc (std::locale::classic()): Weaken locking protocol.

libstdc++/7445
	* src/locale.cc (std::locale::classic()): Weaken locking protocol.

From-SVN: r59078
This commit is contained in:
Loren J. Rittle 2002-11-13 14:55:32 +00:00 committed by Loren J. Rittle
parent 70c73a4d1d
commit 2b298bb772
2 changed files with 6 additions and 3 deletions

View 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.

View 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