From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49834) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aodtY-00029M-DC for qemu-devel@nongnu.org; Fri, 08 Apr 2016 17:24:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aodtU-0006ij-DF for qemu-devel@nongnu.org; Fri, 08 Apr 2016 17:24:48 -0400 Received: from mail-wm0-x235.google.com ([2a00:1450:400c:c09::235]:36691) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aodtU-0006iS-6V for qemu-devel@nongnu.org; Fri, 08 Apr 2016 17:24:44 -0400 Received: by mail-wm0-x235.google.com with SMTP id v188so29899980wme.1 for ; Fri, 08 Apr 2016 14:24:43 -0700 (PDT) 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> From: Alex =?utf-8?Q?Benn=C3=A9e?= In-reply-to: <5707FA93.9090803@twiddle.net> Date: Fri, 08 Apr 2016 22:24:47 +0100 Message-ID: <87a8l3bxpc.fsf@linaro.org> MIME-Version: 1.0 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: Richard Henderson Cc: "Emilio G. Cota" , QEMU Developers , MTTCG Devel , Paolo Bonzini , Peter Crosthwaite , Peter Maydell , Sergey Fedorov Richard Henderson writes: > On 04/08/2016 06:02 AM, Alex Bennée wrote: >>> > +typedef struct QemuSpin { >>> > + int value; >> If we are throwing true and false around as the only two values can we >> use bool here and be consistent when setting/clearing. >> > > 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. > > > r~ -- Alex Bennée