summaryrefslogtreecommitdiffstats
path: root/libstdc++-v3/include
diff options
context:
space:
mode:
authorbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>2005-09-27 01:40:46 +0000
committerbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>2005-09-27 01:40:46 +0000
commitd9dcf5f6b871b17199c07c223d9e5543fa2af058 (patch)
tree2db797ab1795cbc9e57621ee5a787a155a098a42 /libstdc++-v3/include
parenta2fd8728d097ce7ff3de923c5af083e184c2048b (diff)
downloadppe42-gcc-d9dcf5f6b871b17199c07c223d9e5543fa2af058.tar.gz
ppe42-gcc-d9dcf5f6b871b17199c07c223d9e5543fa2af058.zip
2005-09-25 Benjamin Kosnik <bkoz@redhat.com>
Eric Botcazou <ebotcazou@libertysurf.fr> * include/ext/mt_allocator.h (__per_type_pool<...true>::_S_initialize_once): Always call _M_initialize_once. (__common_pool<...true>::_S_initialize_once): Same. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@104678 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include')
-rw-r--r--libstdc++-v3/include/ext/mt_allocator.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/libstdc++-v3/include/ext/mt_allocator.h b/libstdc++-v3/include/ext/mt_allocator.h
index 23dd511374c..014e62a57c1 100644
--- a/libstdc++-v3/include/ext/mt_allocator.h
+++ b/libstdc++-v3/include/ext/mt_allocator.h
@@ -432,8 +432,11 @@ namespace __gnu_cxx
static __gthread_once_t __once = __GTHREAD_ONCE_INIT;
__gthread_once(&__once, _S_initialize);
}
- else
- _S_get_pool()._M_initialize_once();
+
+ // Double check initialization. May be necessary on some
+ // systems for proper construction when not compiling with
+ // thread flags.
+ _S_get_pool()._M_initialize_once();
__init = true;
}
}
@@ -524,8 +527,11 @@ namespace __gnu_cxx
static __gthread_once_t __once = __GTHREAD_ONCE_INIT;
__gthread_once(&__once, _S_initialize);
}
- else
- _S_get_pool()._M_initialize_once();
+
+ // Double check initialization. May be necessary on some
+ // systems for proper construction when not compiling with
+ // thread flags.
+ _S_get_pool()._M_initialize_once();
__init = true;
}
}
OpenPOWER on IntegriCloud