Tag Archives: cmpxchg16b

128bit atomic operation in arm64

In x86_64 architecture, we could use cmpxchg16b to compare and exchange a 128bit value in one atomic operation. But how to operate a 128bit value in aarch64 architecture (arm64) machine ? The answer is __atomic_compare_exchange(). As below code:

use “gcc test.c -o test” to compile code, but it reports:… Read more »