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~

Reply via email to