|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH,RFC]: Introduce libxl_domain_create()
Gianni Tedesco writes ("Re: [Xen-devel] [PATCH,RFC]: Introduce
libxl_domain_create()"):
> On Fri, 2010-12-17 at 09:06 +0000, Ian Campbell wrote:
> > Should be in IDL so it gets a destructor? Could require adding an Array
> > construct to handle the foo + num_foo style stuff.
>
> I've thought about that and rejected it because C arrays don't map to
> anything useful in language bindings. It makes sense to me to keep this
> as a builtin and use functions to fill these domain creation related
> structures in for us.
Arrays map perfectly well to a C pointer and a length. If you want to
do automatic expansion you need a separate allocated length too, which
is probably worthwhile.
> But then what you get is like two versions of:
> - libxl_device_add_(nic|block|etc)
> One for a live domain and one for domain creation.
I think that's fine, particularly if they take the same struct.
> I have been toying with the idea of using polymorphism (is that what
> it's called?) So that such a function would multiplex to different
> implementations depending on whether this is a live domain or a
> description of a domain for creation. It might need a bit of thinking
> through as how it would be used.
Urgh.
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |