From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40553) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anMg3-0000F2-Qv for qemu-devel@nongnu.org; Tue, 05 Apr 2016 04:49:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1anMg0-0002sD-Lf for qemu-devel@nongnu.org; Tue, 05 Apr 2016 04:49:35 -0400 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]:35107) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anMg0-0002s7-ER for qemu-devel@nongnu.org; Tue, 05 Apr 2016 04:49:32 -0400 Received: by mail-wm0-x244.google.com with SMTP id a140so2279624wma.2 for ; Tue, 05 Apr 2016 01:49:32 -0700 (PDT) Sender: Paolo Bonzini References: <1459834253-8291-1-git-send-email-cota@braap.org> <1459834253-8291-3-git-send-email-cota@braap.org> From: Paolo Bonzini Message-ID: <57037C18.6040906@redhat.com> Date: Tue, 5 Apr 2016 10:49:28 +0200 MIME-Version: 1.0 In-Reply-To: <1459834253-8291-3-git-send-email-cota@braap.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 02/10] compiler.h: add QEMU_CACHELINE + QEMU_ALIGN() + QEMU_CACHELINE_ALIGNED List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Emilio G. Cota" , QEMU Developers , MTTCG Devel Cc: Peter Maydell , Sergey Fedorov , Richard Henderson , =?UTF-8?Q?Alex_Benn=c3=a9e?= , Peter Crosthwaite On 05/04/2016 07:30, Emilio G. Cota wrote: > I'm assuming windows compilers don't support this attribute. They actually do. :) Paolo > Signed-off-by: Emilio G. Cota > --- > include/qemu/compiler.h | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h > index 8f1cc7b..fb946f1 100644 > --- a/include/qemu/compiler.h > +++ b/include/qemu/compiler.h > @@ -41,6 +41,16 @@ > # define QEMU_PACKED __attribute__((packed)) > #endif > > +#define QEMU_CACHELINE (64) > + > +#if defined(_WIN32) > +#define QEMU_ALIGN(B) > +#else > +#define QEMU_ALIGN(B) __attribute__((aligned(B))) > +#endif > + > +#define QEMU_CACHELINE_ALIGNED QEMU_ALIGN(QEMU_CACHELINE) > + > #ifndef glue > #define xglue(x, y) x ## y > #define glue(x, y) xglue(x, y) >