On 06/19/2013 01:59 PM, Liu Ping Fan wrote: > +#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. Otherwise, everything looks consistent now. Reviewed-by: Richard Henderson <r...@twiddle.net> r~