On 23 July 2013 03:43, Andreas Färber <afaer...@suse.de> wrote:
> +typedef struct GICState {
> +    /*< private >*/
> +    SysBusDevice busdev;
> +    /*< public >*/
> +
> +    qemu_irq parent_irq[GIC_NCPU];
> +    bool enabled;
> +    bool cpu_enabled[GIC_NCPU];
> +
[etc]

Am I missing some reason why all these fields should be
in the section marked '< public >' ? I would have expected
that they would all be considered private, because only
the GIC implementation (and its subclasses) should be
touching them.

> +    MemoryRegion iomem; /* Distributor */
> +    /* This is just so we can have an opaque pointer which identifies
> +     * both this GIC and which CPU interface we should be accessing.
> +     */
> +    struct GICState *backref[GIC_NCPU];
> +    MemoryRegion cpuiomem[GIC_NCPU + 1]; /* CPU interfaces */
> +    uint32_t num_irq;
> +    uint32_t revision;

...when we get down to here, should properties be
considered 'private' (ie "don't touch except via the
property APIs") or are they 'public' ?

> +} GICState;

(I noticed this because I thought I'd use these
patches as my demonstrator for the __private macro
I suggested in the other thread.)

thanks
-- PMM

Reply via email to