Why is this "atomic_read" and "atomic_write" only use "volatile" in SDK
-
Why is this "atomic_read" and "atomic_set" only use "volatile" in SDK?
the code is in "/lib/bsp/include/atomic.h":
#define atomic_set(ptr, val) ((volatile typeof((ptr)) )(ptr) = val)
#define atomic_read(ptr) ((volatile typeof(*(ptr)) *)(ptr))