@mratsim, That Intel article is really interesting. I also don't use volatile regularly, so I haven't been affected by this, but it is a really interesting thing to know... Another case of the devil is in the details, and how both the compiler and the platform affect things.
@monster, I don't have a lot of experience with mobile, but I think using an atomic long/double is only way to truly guarantee that you get atomic writes on a 32bit platform. It doesn't look like Nim has strong support for this kind of thing beyond ints, so you probably have to drop down to interfacing with C and using something like the GCC atomic intrinsics [https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html](https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html)
