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

Re: [Xen-devel] [PATCH RFC v1 2/4] xl for rt scheduler



Hi Dario,

2014-07-11 11:07 GMT-04:00 Dario Faggioli <dario.faggioli@xxxxxxxxxx>:
On ven, 2014-07-11 at 10:59 -0400, Meng Xu wrote:


> Â Â Â Â > + Â Âlibxl_domain_sched_params_init(&scinfo);
> Â Â Â Â > + Â Ârc = sched_domain_get(LIBXL_SCHEDULER_RT, domid,
> Â Â Â Â &scinfo);
> Â Â Â Â > + Â Âif (rc)
> Â Â Â Â > + Â Â Â Âreturn rc;
> Â Â Â Â > +

> âThank you very much for pasting the rules here! I really appreciate
> it. However, I didn't quite get why it violate the libxl type paradigm
> and how I should correct it. (Sorry. :-()â
>
<<The user must always calls "dispose" exactly once afterwards, to clean
up, regardless of whether operations on this object succeeded or
failed>>

While, above, you're exiting, if rc is true, without calling dispose.

It depens a lot on the function, but what you usually do, is grouping
the calls to the various dispose under a label (typically 'out:') and
goto there to exit.

Look around, both in xl and libxl, you'll find plenty of examples of
that.

âNow I got it. Thank you very much! I will modify it. :-)

Best regards,

Meng


-----------
Meng Xu
PhD Student in Computer and Information Science
University of Pennsylvania
_______________________________________________
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®.