Re: [cxx-mem-model] C++ wrappers

2011-09-19 Thread Jason Merrill
On 09/15/2011 06:02 PM, Andrew MacLeod wrote: On 09/15/2011 05:49 PM, Jason Merrill wrote: Do we want to start exporting these from libstdc++? I dont know the ins and outs of the library... the typedefs and specializations are already there, I can write: atomic_char c; c = 'a' in my progra

Re: [cxx-mem-model] C++ wrappers

2011-09-15 Thread Andrew MacLeod
On 09/15/2011 05:49 PM, Jason Merrill wrote: On 09/15/2011 05:14 PM, Richard Henderson wrote: On 09/15/2011 02:03 PM, Andrew MacLeod wrote: a template calling that particular method was probably not invoked. The joys of c++ templates eh :-) Isn't there an extension that forces an entire cla

Re: [cxx-mem-model] C++ wrappers

2011-09-15 Thread Andrew MacLeod
On 09/15/2011 05:14 PM, Richard Henderson wrote: On 09/15/2011 02:03 PM, Andrew MacLeod wrote: On 09/15/2011 04:47 PM, Richard Henderson wrote: On 09/09/2011 01:29 PM, Andrew MacLeod wrote: ! { return __sync_mem_add__fetch(&_M_i, 1, memory_order_seq_cst); }

Re: [cxx-mem-model] C++ wrappers

2011-09-15 Thread Jason Merrill
On 09/15/2011 05:14 PM, Richard Henderson wrote: On 09/15/2011 02:03 PM, Andrew MacLeod wrote: a template calling that particular method was probably not invoked. The joys of c++ templates eh :-) Isn't there an extension that forces an entire class template to be instantiated? It's stand

Re: [cxx-mem-model] C++ wrappers

2011-09-15 Thread Richard Henderson
On 09/15/2011 02:03 PM, Andrew MacLeod wrote: > On 09/15/2011 04:47 PM, Richard Henderson wrote: >> On 09/09/2011 01:29 PM, Andrew MacLeod wrote: >>> ! { return __sync_mem_add__fetch(&_M_i, 1, memory_order_seq_cst); } >> >> ^^ typo >> >> Which begs the questi

Re: [cxx-mem-model] C++ wrappers

2011-09-15 Thread Andrew MacLeod
On 09/15/2011 04:47 PM, Richard Henderson wrote: On 09/09/2011 01:29 PM, Andrew MacLeod wrote: ! { return __sync_mem_add__fetch(&_M_i, 1, memory_order_seq_cst); } ^^ typo Which begs the question of how this didn't get caught in the testsuite somewhere?

Re: [cxx-mem-model] C++ wrappers

2011-09-15 Thread Richard Henderson
On 09/09/2011 01:29 PM, Andrew MacLeod wrote: > ! { return __sync_mem_add__fetch(&_M_i, 1, memory_order_seq_cst); } ^^ typo Which begs the question of how this didn't get caught in the testsuite somewhere? Otherwise it looks ok. r~

[cxx-mem-model] C++ wrappers

2011-09-09 Thread Andrew MacLeod
Same as before, only a slight change. __sync_mem_flag_test_and_set() and __sync_mem_flag_clear() have been removed in a different consolidation patch, so this changes those calls to __sync_mem_exchange() and __sync_mem_store() which are subsuming all the behaviour of those routines. Straight