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:

The reason is we have not use “libatomic.so”, so use “gcc test.c -o test -latomic” to compile and link the code agin. It works in Fedora 21 (aarch64).

One thought on “128bit atomic operation in arm64

  1. game

    Hi, I believe your website could possibly be having web browser compatibility problems.
    Whenever I take a look at your website in Safari, it looks fine however when opening in I.E.,
    it’s got some overlapping issues. I simply wanted to provide you
    with a quick heads up! Other than that, excellent blog!


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.