> There I only can surrender.

codegen on other compilers for atomic compare-and-swap uses the compiler 
intrinsic directly. TCC being so barebones as it is uses x86 inline asm in 
absence of compiler builtins.

seems like the impl was borrowed [from 
here.](https://stackoverflow.com/q/833122)

ARM has no native CAS instruction so you need to implement your own using a 
spinlock. maybe try the [libbionic 
impl?](https://android.googlesource.com/platform/bionic/+/594b1a4/libc/private/bionic_atomic_arm.h#127)

Reply via email to