[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v1 2/2] include/qemu/atomic: add compile time as
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH v1 2/2] include/qemu/atomic: add compile time asserts |
Date: |
Mon, 4 Apr 2016 10:33:51 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 |
On 01/04/2016 17:03, Alex Bennée wrote:
>
>> > To be safely portable no atomic access should be trying to do more than
>> > the natural word width of the host. The most common abuse is trying to
>> > atomically access 64 bit values on a 32 bit host.
>> >
>> > This patch adds some QEMU_BUILD_BUG_ON to the __atomic instrinsic paths
>> > to create a build failure if (sizeof(*ptr) > sizeof(void *)).
>> >
>> > Signed-off-by: Alex Bennée <address@hidden>
>
> Ping Paolo. Is this worth including in a re-spin?
Yes, please.