type ret; \
asm volatile("ldr" size " %" width(0) ",%1" \
: "=r" (ret) \
- : "m" (*(volatile type *)addr)); \
+ : "m" (*addr)); \
return ret; \
}
static inline void name(volatile type *addr, type val) \
{ \
asm volatile("str" size " %" width(1) ",%0" \
- : "=m" (*(volatile type *)addr) \
+ : "=m" (*addr) \
: "r" (val)); \
}
build_add_sized(add_u16_sized, "h", WORD, uint16_t)
build_add_sized(add_u32_sized, "", WORD, uint32_t)
+#undef BYTE
+#undef WORD
+#undef DWORD
+#undef PAIR
+
+#undef build_atomic_read
+#undef build_atomic_write
+#undef build_add_sized
+
void __bad_atomic_size(void);
#define read_atomic(p) ({ \