On Sun, May 15, 2016 at 06:22:36 -0400, Pranith Kumar wrote: > On Fri, May 13, 2016 at 11:34 PM, Emilio G. Cota <c...@braap.org> wrote: > > When __atomic is not available, we use full memory barriers instead > > of smp/wmb, since acquire/release barriers apply to all memory > > operations and not just to loads/stores, respectively. > > If it is not too late can we rename this to > atomic_load_acquire()/atomic_store_release() like in the linux kernel?
I'd keep read/set just for consistency with the rest of the file. BTW in the kernel, atomic_{read/set}_{acquire/release} are defined in include/linux/atomic.h: #ifndef atomic_read_acquire #define atomic_read_acquire(v) smp_load_acquire(&(v)->counter) #endif #ifndef atomic_set_release #define atomic_set_release(v, i) smp_store_release(&(v)->counter, (i)) #endif The smp_load/store variants are called much more frequently, though. Thanks, Emilio