C++11 atomic library notes
Joseph S. Myers
joseph@codesourcery.com
Mon Oct 3 19:52:00 GMT 2011
On Mon, 3 Oct 2011, Andrew MacLeod wrote:
> On 10/03/2011 01:31 PM, Richard Henderson wrote:
> > On 09/30/2011 01:36 PM, Andrew MacLeod wrote:
> > > http://gcc.gnu.org/wiki/Atomic/GCCMM/LIbrary
> >
> > > __atomic_store (size_t obj_size, T *mem, T val, enum memory_model
> > > model)
> > I don't like this. I really cannot imagine any situation for which the
> > compiler can't resolve SIZE to a compile-time constant. I think it's
> > pointless to have a dispatch routine that just calls all of
> >
> its a library call for arbitrary sized objects... C++ can have any class
> declared atomic, so it doesn't have to map to one of those optimized lock-free
> routines.
Likewise, in C1X you can also apply _Atomic to arbitrary-size structures.
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Gcc
mailing list