This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: C++11 atomic library notes
- From: Richard Henderson <rth at redhat dot com>
- To: Andrew MacLeod <amacleod at redhat dot com>
- Cc: Lawrence Crowl <crowl at google dot com>, Benjamin Kosnik <bkoz at redhat dot com>, Aldy Hernandez <aldyh at redhat dot com>, GCC <gcc at gcc dot gnu dot org>
- Date: Mon, 03 Oct 2011 10:31:29 -0700
- Subject: Re: C++11 atomic library notes
- References: <4E862864.2010607@redhat.com>
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
> __atomic_store_1 (T *mem, T val, enum memory_model model)
> __atomic_store_2 (T *mem, T val, enum memory_model model)
> __atomic_store_4 (T *mem, T val, enum memory_model model)
> __atomic_store_8 (T *mem, T val, enum memory_model model)
> __atomic_store_16 (T *mem, T val, enum memory_model model)
and so forth.
r~