From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48409) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aobIQ-0001aX-2R for qemu-devel@nongnu.org; Fri, 08 Apr 2016 14:38:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aobIM-0001C2-T6 for qemu-devel@nongnu.org; Fri, 08 Apr 2016 14:38:17 -0400 Received: from mail-qg0-x241.google.com ([2607:f8b0:400d:c04::241]:35158) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aobIM-0001Bs-Os for qemu-devel@nongnu.org; Fri, 08 Apr 2016 14:38:14 -0400 Received: by mail-qg0-x241.google.com with SMTP id b32so10784979qgf.2 for ; Fri, 08 Apr 2016 11:38:14 -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> From: Richard Henderson Message-ID: <5707FA93.9090803@twiddle.net> Date: Fri, 8 Apr 2016 11:38:11 -0700 MIME-Version: 1.0 In-Reply-To: <87bn5kb6ek.fsf@linaro.org> 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: =?UTF-8?Q?Alex_Benn=c3=a9e?= , "Emilio G. Cota" Cc: QEMU Developers , MTTCG Devel , Paolo Bonzini , Peter Crosthwaite , Peter Maydell , Sergey Fedorov 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. r~