OSDN Git Service

And retweak.
[pf3gnuchains/gcc-fork.git] / libstdc++-v3 / include / ext / stl_rope.h
index 8099b27..c8ada9c 100644 (file)
@@ -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