« Previous | Next » 

Revision 392a4d5b

ID392a4d5b9a1860aae82429d09321dac302d70396

Added by Peter Maydell over 10 years ago

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 <>
Signed-off-by: Paolo Bonzini <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences