From: Michael Ritzert Date: Tue, 6 May 2003 19:31:39 +0000 (+0000) Subject: And retweak. X-Git-Tag: releases/gcc-3.4.0~6769 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b7c4cd53ab4c40e84073511a84669680e916554e;p=thirdparty%2Fgcc.git And retweak. Co-Authored-By: Matt Kraai From-SVN: r66530 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 63269907d0ff..9ca9ce1a0eb7 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,6 +1,9 @@ 2003-05-06 Michael Ritzert + Matt Kraai * include/ext/stl_rope.h (_Rope_RopeRep<>::_M_c_string_lock): Tweak. + And retweak. + 2003-05-06 Richard Sandiford * configure.target (mips*): Use the generic atomicity.h by default. diff --git a/libstdc++-v3/include/ext/stl_rope.h b/libstdc++-v3/include/ext/stl_rope.h index 8099b270060c..c8ada9ca7660 100644 --- a/libstdc++-v3/include/ext/stl_rope.h +++ b/libstdc++-v3/include/ext/stl_rope.h @@ -500,7 +500,11 @@ struct _Rope_RopeRep : public _Rope_rep_base<_CharT,_Alloc> # endif _M_tag(__t), _M_is_balanced(__b), _M_depth(__d), _M_c_string(0) #ifdef __GTHREAD_MUTEX_INIT - { _M_c_string_lock = __GTHREAD_MUTEX_INIT; } + { + // Do not copy a POSIX/gthr mutex once in use. However, bits are bits. + __gthread_mutex_t __tmp = __GTHREAD_MUTEX_INIT; + _M_c_string_lock = __tmp; + } #else { __GTHREAD_MUTEX_INIT_FUNCTION (&_M_c_string_lock); } #endif