From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44953) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UogkR-0000eD-VH for qemu-devel@nongnu.org; Mon, 17 Jun 2013 17:14:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UogkN-0007O9-AI for qemu-devel@nongnu.org; Mon, 17 Jun 2013 17:13:59 -0400 Received: from cantor2.suse.de ([195.135.220.15]:33164 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UogkN-0007Nv-2Y for qemu-devel@nongnu.org; Mon, 17 Jun 2013 17:13:55 -0400 Message-ID: <51BF7C10.90005@suse.de> Date: Mon, 17 Jun 2013 23:13:52 +0200 From: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= MIME-Version: 1.0 References: <1371398269-6213-1-git-send-email-afaerber@suse.de> <1371398269-6213-26-git-send-email-afaerber@suse.de> <51BF78C1.1010006@twiddle.net> In-Reply-To: <51BF78C1.1010006@twiddle.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH qom-cpu v2 25/29] cpu: Move CPU_INTERRUPT_* to qom/cpu.h List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: qemu-devel@nongnu.org Am 17.06.2013 22:59, schrieb Richard Henderson: > On 06/16/2013 08:57 AM, Andreas F=C3=A4rber wrote: >> +enum CPUInterruptFlags { >> + CPU_INTERRUPT_HARD =3D 0x0002, >> + CPU_INTERRUPT_EXITTB =3D 0x0004, >> + CPU_INTERRUPT_HALT =3D 0x0020, >> + CPU_INTERRUPT_DEBUG =3D 0x0080, >> + >> +#if defined(CONFIG_SOFTMMU) || defined(CONFIG_USER_ONLY) >> + /* Several target-specific external hardware interrupts. >> + * Each target/cpu.h should define proper names based on them. >> + */ >> + CPU_INTERRUPT_TGT_EXT_0 =3D 0x0008, >> + CPU_INTERRUPT_TGT_EXT_1 =3D 0x0010, >> + CPU_INTERRUPT_TGT_EXT_2 =3D 0x0040, >> + CPU_INTERRUPT_TGT_EXT_3 =3D 0x0200, >> + CPU_INTERRUPT_TGT_EXT_4 =3D 0x1000, >=20 > I don't like this. It's a subtle point between C and C++ that the late= r can > change the implementation type of the enum based on the contents of the= enum. > While we don't currently ever build with C++, I'd rather not have somet= hing > like this hiding. >=20 > Is the ifdef really better than the poison? With today's poison we can't use it in qom/cpu.c nor intc/sh_intc.c. Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=C3=BCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=C3=B6rffer; HRB 16746 AG N=C3=BC= rnberg