From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37849) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VYUn1-0004zs-L7 for qemu-devel@nongnu.org; Tue, 22 Oct 2013 01:46:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VYUmv-0007bi-Qj for qemu-devel@nongnu.org; Tue, 22 Oct 2013 01:45:59 -0400 Received: from mail-wi0-x230.google.com ([2a00:1450:400c:c05::230]:37087) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VYUmv-0007ba-JO for qemu-devel@nongnu.org; Tue, 22 Oct 2013 01:45:53 -0400 Received: by mail-wi0-f176.google.com with SMTP id l12so5013280wiv.15 for ; Mon, 21 Oct 2013 22:45:52 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <5266110B.70901@redhat.com> Date: Tue, 22 Oct 2013 06:45:47 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1372950842-32422-1-git-send-email-pbonzini@redhat.com> <1372950842-32422-55-git-send-email-pbonzini@redhat.com> <5264C456.9040404@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 54/66] add a header file for atomic operations List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: QEMU Developers Il 21/10/2013 14:53, Peter Maydell ha scritto: > Yes, using __sync_swap seems to work OK. Does clang on linux > require the four-argument __atomic_exchange() or can we just > make the #ifdef __clang__ come first in the #if ladder? Please do that (change the ladder), it's definitely a good idea. > http://libcxx.llvm.org/atomic_design_a.html suggests llvm/clang's > __atomic_exchange() is three argument on all platforms, ie this > isn't just a macos weirdness. It's not. It's definitely a pity that GCC and LLVM disagree. :( Mystery... Paolo