From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41225) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UogWn-0004Gj-Mc for qemu-devel@nongnu.org; Mon, 17 Jun 2013 16:59:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UogWk-0002Vp-0I for qemu-devel@nongnu.org; Mon, 17 Jun 2013 16:59:53 -0400 Received: from mail-ve0-x236.google.com ([2607:f8b0:400c:c01::236]:56148) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UogWj-0002Vk-Si for qemu-devel@nongnu.org; Mon, 17 Jun 2013 16:59:49 -0400 Received: by mail-ve0-f182.google.com with SMTP id ox1so2506616veb.41 for ; Mon, 17 Jun 2013 13:59:49 -0700 (PDT) Sender: Richard Henderson Message-ID: <51BF78C1.1010006@twiddle.net> Date: Mon, 17 Jun 2013 13:59:45 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1371398269-6213-1-git-send-email-afaerber@suse.de> <1371398269-6213-26-git-send-email-afaerber@suse.de> In-Reply-To: <1371398269-6213-26-git-send-email-afaerber@suse.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= Cc: qemu-devel@nongnu.org On 06/16/2013 08:57 AM, Andreas Färber wrote: > +enum CPUInterruptFlags { > + CPU_INTERRUPT_HARD = 0x0002, > + CPU_INTERRUPT_EXITTB = 0x0004, > + CPU_INTERRUPT_HALT = 0x0020, > + CPU_INTERRUPT_DEBUG = 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 = 0x0008, > + CPU_INTERRUPT_TGT_EXT_1 = 0x0010, > + CPU_INTERRUPT_TGT_EXT_2 = 0x0040, > + CPU_INTERRUPT_TGT_EXT_3 = 0x0200, > + CPU_INTERRUPT_TGT_EXT_4 = 0x1000, I don't like this. It's a subtle point between C and C++ that the later 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 something like this hiding. Is the ifdef really better than the poison? r~