From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50614) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aodzz-0002AK-Qt for qemu-devel@nongnu.org; Fri, 08 Apr 2016 17:31:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aodzv-0007R0-Nr for qemu-devel@nongnu.org; Fri, 08 Apr 2016 17:31:27 -0400 Received: from mail-qk0-x241.google.com ([2607:f8b0:400d:c09::241]:35926) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aodzv-0007Qv-KS for qemu-devel@nongnu.org; Fri, 08 Apr 2016 17:31:23 -0400 Received: by mail-qk0-x241.google.com with SMTP id e124so5581929qkc.3 for ; Fri, 08 Apr 2016 14:31:22 -0700 (PDT) Sender: Richard Henderson References: <1460050358-25025-1-git-send-email-cota@braap.org> <1460050358-25025-7-git-send-email-cota@braap.org> <87bn5kb6ek.fsf@linaro.org> <5707FA93.9090803@twiddle.net> <87a8l3bxpc.fsf@linaro.org> <570821FD.2010107@redhat.com> From: Richard Henderson Message-ID: <57082326.4050604@twiddle.net> Date: Fri, 8 Apr 2016 14:31:18 -0700 MIME-Version: 1.0 In-Reply-To: <570821FD.2010107@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v2 06/13] qemu-thread: add simple test-and-set spinlock List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , =?UTF-8?Q?Alex_Benn=c3=a9e?= Cc: "Emilio G. Cota" , QEMU Developers , MTTCG Devel , Peter Crosthwaite , Peter Maydell , Sergey Fedorov On 04/08/2016 02:26 PM, Paolo Bonzini wrote: > > > On 08/04/2016 23:24, Alex Bennée wrote: >>> Except that quite a lot of hosts can only (efficiently) do atomic operations on >>> a minimum of 4 byte quantities. I'd rather continue to use int here. >> >> I suspect bool == unsigned int underneath. But having true/false and 0/1 mixed up >> gets confusing even if they are equivalent. > > Sometimes sizeof(bool) == 1. sizeof(bool) == 1 everywhere except MacOSX, where it's 4. r~