]> git.proxmox.com Git - qemu.git/commit
atomic.h: Fix build with clang
authorPeter Maydell <peter.maydell@linaro.org>
Tue, 22 Oct 2013 09:58:41 +0000 (10:58 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 21 Nov 2013 16:38:57 +0000 (17:38 +0100)
commit392a4d5b9a1860aae82429d09321dac302d70396
treed6fd58c07cec85254648c55168cca6daadc65c84
parent7839ff593be03a7de3c6760e0b50c565ea751d36
atomic.h: Fix build with clang

clang defines __ATOMIC_SEQ_CST but its implementation of the
__atomic_exchange() builtin differs from that of gcc. Move the
__clang__ branch of the ifdef ladder to the top and fix its
implementation (there is no such builtin as __sync_exchange),
so we can compile with clang again.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
include/qemu/atomic.h