qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH qom-cpu v2 25/29] cpu: Move CPU_INTERRUPT_* to q


From: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH qom-cpu v2 25/29] cpu: Move CPU_INTERRUPT_* to qom/cpu.h
Date: Mon, 17 Jun 2013 23:13:52 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6

Am 17.06.2013 22:59, schrieb Richard Henderson:
> 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?

With today's poison we can't use it in qom/cpu.c nor intc/sh_intc.c.

Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg



reply via email to

[Prev in Thread] Current Thread [Next in Thread]