Il 19/06/2013 18:37, Richard Henderson ha scritto: >> > +#ifndef atomic_read >> > +#define atomic_read(ptr) (*(__typeof__(*ptr) *volatile) (ptr)) >> > #endif >> > >> > +#ifndef atomic_set >> > +#define atomic_set(ptr, i) ((*(__typeof__(*ptr) *volatile) (ptr)) = >> > (i)) >> > +#endif > I still think these should be enhanced to reject operations larger > than word-size, so that we don't accidentally introduce bugs for our > 32-bit hosts. But that can be done as a follow-up.
Oops, forgot about that (and also using relaxed instead of volatile). Will do as a follow-up. Thanks! Paolo > Otherwise, everything looks consistent now. > > Reviewed-by: Richard Henderson <r...@twiddle.net>