[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] libxl: move libxl__sched_set_params into libxl.c
# HG changeset patch # User Ian Campbell <ian.campbell@xxxxxxxxxx> # Date 1338548780 -3600 # Node ID 4f743faf755977697ad0060f888a93753dc40f54 # Parent 53a905c9bb9a784e205c29a39f76153399e27ee0 libxl: move libxl__sched_set_params into libxl.c All the other sched functions are here and I'm just about to make those static functions as I make libxl__sched_set_params the public function. Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> Acked-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx> Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> Committed-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- diff -r 53a905c9bb9a -r 4f743faf7559 tools/libxl/libxl.c --- a/tools/libxl/libxl.c Fri Jun 01 12:06:20 2012 +0100 +++ b/tools/libxl/libxl.c Fri Jun 01 12:06:20 2012 +0100 @@ -3549,6 +3549,33 @@ int libxl_sched_sedf_domain_set(libxl_ct return 0; } +int libxl__sched_set_params(libxl__gc *gc, uint32_t domid, + libxl_domain_sched_params *scparams) +{ + libxl_scheduler sched = scparams->sched; + int ret; + + if (sched == LIBXL_SCHEDULER_UNKNOWN) + sched = libxl__domain_scheduler(gc, domid); + + switch (sched) { + case LIBXL_SCHEDULER_SEDF: + ret=libxl_sched_sedf_domain_set(CTX, domid, scparams); + break; + case LIBXL_SCHEDULER_CREDIT: + ret=libxl_sched_credit_domain_set(CTX, domid, scparams); + break; + case LIBXL_SCHEDULER_CREDIT2: + ret=libxl_sched_credit2_domain_set(CTX, domid, scparams); + break; + default: + LOG(ERROR, "Unknown scheduler"); + ret=ERROR_INVAL; + break; + } + return ret; +} + int libxl_send_trigger(libxl_ctx *ctx, uint32_t domid, libxl_trigger trigger, uint32_t vcpuid) { diff -r 53a905c9bb9a -r 4f743faf7559 tools/libxl/libxl_dom.c --- a/tools/libxl/libxl_dom.c Fri Jun 01 12:06:20 2012 +0100 +++ b/tools/libxl/libxl_dom.c Fri Jun 01 12:06:20 2012 +0100 @@ -42,33 +42,6 @@ libxl_domain_type libxl__domain_type(lib return LIBXL_DOMAIN_TYPE_PV; } -int libxl__sched_set_params(libxl__gc *gc, uint32_t domid, - libxl_domain_sched_params *scparams) -{ - libxl_scheduler sched = scparams->sched; - int ret; - - if (sched == LIBXL_SCHEDULER_UNKNOWN) - sched = libxl__domain_scheduler(gc, domid); - - switch (sched) { - case LIBXL_SCHEDULER_SEDF: - ret=libxl_sched_sedf_domain_set(CTX, domid, scparams); - break; - case LIBXL_SCHEDULER_CREDIT: - ret=libxl_sched_credit_domain_set(CTX, domid, scparams); - break; - case LIBXL_SCHEDULER_CREDIT2: - ret=libxl_sched_credit2_domain_set(CTX, domid, scparams); - break; - default: - LOG(ERROR, "Unknown scheduler"); - ret=ERROR_INVAL; - break; - } - return ret; -} - int libxl__domain_shutdown_reason(libxl__gc *gc, uint32_t domid) { libxl_ctx *ctx = libxl__gc_owner(gc); _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |