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

Re: [Xen-devel] [PATCH] libxl: correct libxl to obey libxl's programming paramdigm



On Fri, 2014-08-01 at 18:02 +0100, Wei Liu wrote:
> On Sat, Aug 02, 2014 at 12:37:21AM +0800, Meng Xu wrote:
> [...]
> > > * to a libxl function.
> > >
> > > So calling dispose in the end while not calling init at the beginning is
> > > still bogus.
> > >
> > 
> > âI didn't call the init function at the beginning because the init function
> > is called in the function âlibxl_domain_sched_params_get() at file
> > tools/libxl/libxl.c.
> > 
> > My question is: should I call the init function again in xl_cmdimpl.c?
> > (Although calling it twice seems causing no damage, I'm not sure if it's a
> > good idea.)
> > 
> 
> I think _init and _dispose should be placed in same place. I would vote
> for moving that _init from libxl to xl. You might want to get some input
> from maintainers before submitting another version.

Since _init is idempotent for structs which are out parameters it is
fine to call _init from both from the application and libxl.

The application *should* be calling _init, but it is a good idea if
libxl does it too, just in case etc etc.

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.