This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]