On 08/29/2016 10:17 AM, Pranith Kumar wrote:
#define atomic_read(ptr) \
({ \
QEMU_BUILD_BUG_ON(sizeof(*ptr) > sizeof(void *)); \
- typeof_strip_qual(*ptr) _val; \
- __atomic_load(ptr, &_val, __ATOMIC_RELAXED); \
- _val; \
+ __atomic_load_n(ptr, __ATOMIC_RELAXED); \
Technically this produces a different type result. E.g. an int instead of an enum. I don't know if we have any such uses... r~
