Counter-PATCH (libstdc++-v3, mainline) for: std::_Atomic_swap for i386
Danny Smith
danny_r_smith_2001@yahoo.co.nz
Sat May 3 12:38:00 GMT 2003
--- Loren James Rittle <rittle@latour.rsch.comm.mot.com> wrote: > Danny R.
Smith writes:
>
> Danny, here is the counter-patch (which I did test against both mutex
> init styles). I shall commit to mainline after you verify that it
> works for you in your environment and you agree that it is not a
> completely disagreeable replacement patch (along with a new threaded
> test case which actually tests c_str in a mode where an internal
> failure could result):
>
> * include/bits/stl_threads.h (_Atomic_swap): Kill it...
> (_Swap_lock_struct<>): ...and the horse it rode in on.
> * src/globals.cc (_Swap_lock_struct<>): Likewise.
> * include/ext/stl_rope.h (_Rope_RopeRep<>::_M_c_string_lock): New
> member to support...
> * include/ext/ropeimpl.h (rope<>::c_str): Follow *all* memory
> visibility rules related to POSIX threads.
> * testsuite/thread/pthread7-rope.cc: New test.
>
Your patch allows compilation of libstdc++ on
mingw32(__GTHREAD_MUTEX_INIT_FUNCTION) and cygwin (__GTHREAD_MUTEX_INIT). Your
new testcase does not apply to mingw (I will but haven't yet tried with
pthreads-win32 emulation library) but does pass with cygwin.
I "agree that it is not a completely disagreeable replacement patch" :)
Thanks.
Danny
http://mobile.yahoo.com.au - Yahoo! Mobile
- Check & compose your email via SMS on your Telstra or Vodafone mobile.
More information about the Libstdc++
mailing list