From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH] libxl: libxl_domain_sched_params_set case for ARINC 653 scheduler Date: Tue, 24 Jul 2012 20:31:30 +0200 Message-ID: <1343154690.13198.6.camel@Abyss> References: <857a035d6a4a835bb258.1343149194@arlpc33> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2063339161664569817==" Return-path: In-Reply-To: <857a035d6a4a835bb258.1343149194@arlpc33> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Kane Cc: george.dunlap@eu.citrix.com, xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --===============2063339161664569817== Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-jumGpI6kDORD9XUyDfPX" --=-jumGpI6kDORD9XUyDfPX Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Andrew, On Tue, 2012-07-24 at 12:59 -0400, Andrew Kane wrote:=20 > Implements sched_arinc653_domain_set to match the existing API. Currently= , > there is no domain-specific configuration when using the ARINC 653 schedu= ler, > so we simply return success. >=20 Cool, thanks for doing this. I've only a small question... > diff -r 4a28c496acbf -r 857a035d6a4a tools/libxl/libxl.c > --- a/tools/libxl/libxl.c Mon Jul 23 17:58:33 2012 +0100 > +++ b/tools/libxl/libxl.c Tue Jul 24 11:41:39 2012 -0400 > @@ -3642,6 +3642,14 @@ libxl_scheduler libxl_get_scheduler(libx > return sched; > } > =20 > +static int sched_arinc653_domain_set(libxl__gc *gc, uint32_t domid, > + const libxl_domain_sched_params *sc= info) > +{ > + // Currently, the ARINC 653 scheduler does not take any domain-speci= fic > + // configuration, so we simply return success. > I think using C (/* */) style for comment is highly recommended, if not required. :-) > + return 0; > +} > + > It's certainly not a bit deal, and the compiler might be doing this on its own already but, as the function doesn't actually do anything, why not putting the comment down in the switch [*]? That way we still avoid LIBXL_SCHEDULING_ARNIC653 being caught by the default: clause and resulting in an error, but without introducing an empty function that might look confusing. If in future there will be the need for a specific sched_arnic653_domain_set function, we can add it then. > static int sched_credit_domain_get(libxl__gc *gc, uint32_t domid, > libxl_domain_sched_params *scinfo) > { > @@ -3909,6 +3917,9 @@ int libxl_domain_sched_params_set(libxl_ > case LIBXL_SCHEDULER_CREDIT2: > ret=3Dsched_credit2_domain_set(gc, domid, scinfo); > break; > + case LIBXL_SCHEDULER_ARINC653: > + ret=3Dsched_arinc653_domain_set(gc, domid, scinfo); > + break; > [*] I mean right here... :-) > default: > LOG(ERROR, "Unknown scheduler"); > ret=3DERROR_INVAL; >=20 Regards, Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://retis.sssup.it/people/faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-jumGpI6kDORD9XUyDfPX Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEABECAAYFAlAO6gIACgkQk4XaBE3IOsSRrwCfVk2mUFxprNU+nLdqbhy2bbCt rk0An0GlIJ7pA5syS4fYsTAtRjPpYAPu =1TvU -----END PGP SIGNATURE----- --=-jumGpI6kDORD9XUyDfPX-- --===============2063339161664569817== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============2063339161664569817==--