qemu-arm
[Top][All Lists]
Advanced

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

Re: [Qemu-arm] [Qemu-devel] RFC: raspberry pi / pi2 / Windows-on-ARM sup


From: Andrew Baumann
Subject: Re: [Qemu-arm] [Qemu-devel] RFC: raspberry pi / pi2 / Windows-on-ARM support
Date: Wed, 25 Nov 2015 18:14:58 +0000

> From: Peter Maydell [mailto:address@hidden
> Sent: Wednesday, 25 November 2015 01:11
> On 25 November 2015 at 06:04, Peter Crosthwaite
> <address@hidden> wrote:
> > On Tue, Nov 24, 2015 at 4:00 PM, Andrew Baumann
> > <address@hidden> wrote:
> >>In general, what's the guidance on what belongs in object init vs. the
> realize method?
> >
> > If it doesn't depend on property values, it goes in init. If it does
> > realize. Top level connectivity (e.g. connecting to UARTs are initing
> > drives) generally are realize.
> 
> Also, realize has a mechanism for reporting errors (the Error** argument)
> and instance init does not, so anything that might fail must go in
> realize.

How does this work out with object_property_add_alias? It can fail and returns 
an error, so it should be called from realize, but it adds a new property on 
the object, so the property won't be useful if it can only be set after realize 
has added it.

It seems like everyone calling object_property_add_alias passes &error_abort, 
so I suppose that is the get-out-of-jail card for reporting errors from init...

Thanks,
Andrew

reply via email to

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