This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Counter-PATCH (libstdc++-v3, mainline) for: std::_Atomic_swap for i386
- From: Danny Smith <danny_r_smith_2001 at yahoo dot co dot nz>
- To: Loren James Rittle <rittle at latour dot rsch dot comm dot mot dot com>, gcc-patches at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org
- Cc: danny_r_smith_2001 at yahoo dot co dot nz
- Date: Sat, 3 May 2003 22:38:49 +1000 (EST)
- Subject: Re: Counter-PATCH (libstdc++-v3, mainline) for: std::_Atomic_swap for i386
--- 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.