1#define READ_ONCE(x) (*(const volatile typeof(x) *) &(x))
2
3#define WRITE_ONCE(x, val) \
4 do { \
5 *(volatile typeof(x) *) &(x) = (val); \
6 } while (0)
7