[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 06/13] qemu-thread: add simple test-and-set s

From: Alex Bennée
Subject: Re: [Qemu-devel] [PATCH v2 06/13] qemu-thread: add simple test-and-set spinlock
Date: Fri, 08 Apr 2016 22:24:47 +0100
User-agent: mu4e 0.9.17; emacs

Richard Henderson <address@hidden> 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 
gets confusing even if they are equivalent.

> r~

Alex Bennée

reply via email to

[Prev in Thread] Current Thread [Next in Thread]