Jinoh Kang (@iamahuman) commented about server/user.c:
* need atomic intrinsics to guarantee that. */
+#if defined(__i386__) || defined(__x86_64__)
- *ptr = value;
+#else
- __atomic_store_n(ptr, value, __ATOMIC_SEQ_CST);
+#endif +}
+static void atomic_store_u64(volatile unsigned __int64 *ptr, unsigned __int64 value) +{
- /* on x86 there should be total store order guarantees, so volatile is
* enough to ensure the stores aren't reordered by the compiler, and then
* they will always be seen in-order from other CPUs. On other archs, we
* need atomic intrinsics to guarantee that. */
+#if defined(__i386__) || defined(__x86_64__)
- *ptr = value;
64-bit volatile stores are not atomic on `__i386__`.