On 09/04/16 00:31, Richard Henderson wrote:
> 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
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
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
>
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
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
On 04/07/2016 10:32 AM, Emilio G. Cota wrote:
> +while (atomic_read(>value));
I really really don't like ; snuggled up behind loop conditions.
Isn't this where you want to use pause, anyway?
r~
Emilio G. Cota writes:
> From: Guillaume Delbergue
>
> Signed-off-by: Guillaume Delbergue
> [Rewritten. - Paolo]
> Signed-off-by: Paolo Bonzini
> ---
> include/qemu/thread.h | 31
From: Guillaume Delbergue
Signed-off-by: Guillaume Delbergue
[Rewritten. - Paolo]
Signed-off-by: Paolo Bonzini
---
include/qemu/thread.h | 31 +++
1 file changed, 31