From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34079) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1amzxP-0004Ch-H3 for qemu-devel@nongnu.org; Mon, 04 Apr 2016 04:34:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1amzxM-0004lY-CM for qemu-devel@nongnu.org; Mon, 04 Apr 2016 04:33:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35019) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1amzxL-0004lP-6O for qemu-devel@nongnu.org; Mon, 04 Apr 2016 04:33:56 -0400 References: <1458577386-9984-1-git-send-email-alex.bennee@linaro.org> <1458577386-9984-3-git-send-email-alex.bennee@linaro.org> <87pou9fk2i.fsf@linaro.org> From: Paolo Bonzini Message-ID: <570226EF.7090707@redhat.com> Date: Mon, 4 Apr 2016 10:33:51 +0200 MIME-Version: 1.0 In-Reply-To: <87pou9fk2i.fsf@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v1 2/2] include/qemu/atomic: add compile time asserts List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?Q?Alex_Benn=c3=a9e?= , qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, sbruno@freebsd.org On 01/04/2016 17:03, Alex Benn=C3=A9e wrote: >=20 >> > To be safely portable no atomic access should be trying to do more t= han >> > 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 pa= ths >> > to create a build failure if (sizeof(*ptr) > sizeof(void *)). >> > >> > Signed-off-by: Alex Benn=C3=A9e >=20 > Ping Paolo. Is this worth including in a re-spin? Yes, please.