Received: from eggs.gnu.org ([2001:4830:134:3::10]:55305) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anQXl-0001EK-HP for qemu-devel@nongnu.org; Tue, 05 Apr 2016 08:57:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1anQXh-0000J8-Dj for qemu-devel@nongnu.org; Tue, 05 Apr 2016 08:57:17 -0400 Received: from roura.ac.upc.edu ([147.83.33.10]:40243 helo=roura.ac.upc.es) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anQXh-0000In-1i for qemu-devel@nongnu.org; Tue, 05 Apr 2016 08:57:13 -0400 From: =?utf-8?Q?Llu=C3=ADs_Vilanova?= References: <1459834253-8291-1-git-send-email-cota@braap.org> <1459834253-8291-3-git-send-email-cota@braap.org> Date: Tue, 05 Apr 2016 14:57:04 +0200 In-Reply-To: <1459834253-8291-3-git-send-email-cota@braap.org> (Emilio G. Cota's message of "Tue, 5 Apr 2016 01:30:45 -0400") Message-ID: <87shz0tdr3.fsf@fimbulvetr.bsc.es> MIME-Version: 1.0 Content-Type: text/plain 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" Cc: MTTCG Devel , Peter Maydell , Peter Crosthwaite , QEMU Developers , Paolo Bonzini , Sergey Fedorov , Alex =?utf-8?Q?Benn=C3=A9e?= , Richard Henderson Emilio G Cota writes: > I'm assuming windows compilers don't support this attribute. > 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) [...] You should make this a value taken from configure. In linux you could use something like: getconf LEVEL1_DCACHE_LINESIZE Or an equivalent program using sysconf(3) if getconf is not present. Cheers, Lluis