diff options
author | Benjamin Kosnik <bkoz@redhat.com> | 2005-09-27 01:40:46 +0000 |
---|---|---|
committer | Benjamin Kosnik <bkoz@gcc.gnu.org> | 2005-09-27 01:40:46 +0000 |
commit | 4bd2f9d6a1cd4577e9713c2257ab0557d9288427 (patch) | |
tree | 2db797ab1795cbc9e57621ee5a787a155a098a42 | |
parent | 92b4f0af9d4b3cd46118c276dab979cb4089c787 (diff) | |
download | gcc-4bd2f9d6a1cd4577e9713c2257ab0557d9288427.zip gcc-4bd2f9d6a1cd4577e9713c2257ab0557d9288427.tar.gz gcc-4bd2f9d6a1cd4577e9713c2257ab0557d9288427.tar.bz2 |
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.
Co-Authored-By: Eric Botcazou <ebotcazou@libertysurf.fr>
From-SVN: r104678
-rw-r--r-- | libstdc++-v3/ChangeLog | 8 | ||||
-rw-r--r-- | libstdc++-v3/include/ext/mt_allocator.h | 14 |
2 files changed, 18 insertions, 4 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 60af325..5962413 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,11 @@ +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. + 2005-09-23 Benjamin Kosnik <bkoz@redhat.com> * testsuite/ext/mt_allocator/tune-1.cc: Clarify for single-thread. diff --git a/libstdc++-v3/include/ext/mt_allocator.h b/libstdc++-v3/include/ext/mt_allocator.h index 23dd511..014e62a 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; } } |