From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH 3/3] arinc: Add poolid parameter to scheduler get/set functions. Date: Tue, 19 Nov 2013 10:32:59 +0000 Message-ID: <528B3E5B.2010604@citrix.com> References: <1384805814-3597-1-git-send-email-nate.studer@dornerworks.com> <1384805814-3597-4-git-send-email-nate.studer@dornerworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1384805814-3597-4-git-send-email-nate.studer@dornerworks.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Nathan Studer Cc: Simon Martin , Ian Campbell , Stefano Stabellini , George Dunlap , Ian Jackson , Robert VanVossen , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 18/11/2013 20:16, Nathan Studer wrote: > From: Nathan Studer > > Also create a backwards compatible interface to these functions. > > Signed-off-by: Nathan Studer libxc is an unstable API. No need for _v2 suffixes. ~Andrew > --- > tools/libxc/xc_arinc653.c | 10 ++++++---- > tools/libxc/xenctrl.h | 12 ++++++++++-- > 2 files changed, 16 insertions(+), 6 deletions(-) > > diff --git a/tools/libxc/xc_arinc653.c b/tools/libxc/xc_arinc653.c > index fe2ddcb..3310f38 100644 > --- a/tools/libxc/xc_arinc653.c > +++ b/tools/libxc/xc_arinc653.c > @@ -27,8 +27,9 @@ > #include "xc_private.h" > > int > -xc_sched_arinc653_schedule_set( > +xc_sched_arinc653_schedule_set_v2( > xc_interface *xch, > + uint32_t cpupool_id, > struct xen_sysctl_arinc653_schedule *schedule) > { > int rc; > @@ -42,7 +43,7 @@ xc_sched_arinc653_schedule_set( > return -1; > > sysctl.cmd = XEN_SYSCTL_scheduler_op; > - sysctl.u.scheduler_op.cpupool_id = 0; > + sysctl.u.scheduler_op.cpupool_id = cpupool_id; > sysctl.u.scheduler_op.sched_id = XEN_SCHEDULER_ARINC653; > sysctl.u.scheduler_op.cmd = XEN_SYSCTL_SCHEDOP_putinfo; > set_xen_guest_handle(sysctl.u.scheduler_op.u.sched_arinc653.schedule, > @@ -56,8 +57,9 @@ xc_sched_arinc653_schedule_set( > } > > int > -xc_sched_arinc653_schedule_get( > +xc_sched_arinc653_schedule_get_v2( > xc_interface *xch, > + uint32_t cpupool_id, > struct xen_sysctl_arinc653_schedule *schedule) > { > int rc; > @@ -71,7 +73,7 @@ xc_sched_arinc653_schedule_get( > return -1; > > sysctl.cmd = XEN_SYSCTL_scheduler_op; > - sysctl.u.scheduler_op.cpupool_id = 0; > + sysctl.u.scheduler_op.cpupool_id = cpupool_id; > sysctl.u.scheduler_op.sched_id = XEN_SCHEDULER_ARINC653; > sysctl.u.scheduler_op.cmd = XEN_SYSCTL_SCHEDOP_getinfo; > set_xen_guest_handle(sysctl.u.scheduler_op.u.sched_arinc653.schedule, > diff --git a/tools/libxc/xenctrl.h b/tools/libxc/xenctrl.h > index 4ac6b8a..190f442 100644 > --- a/tools/libxc/xenctrl.h > +++ b/tools/libxc/xenctrl.h > @@ -793,14 +793,22 @@ int xc_sched_credit2_domain_get(xc_interface *xch, > uint32_t domid, > struct xen_domctl_sched_credit2 *sdom); > > +#define xc_sched_arinc653_schedule_set(xch, schedule) \ > + xc_sched_arinc653_schedule_set_v2(xch, 0, schedule) > + > int > -xc_sched_arinc653_schedule_set( > +xc_sched_arinc653_schedule_set_v2( > xc_interface *xch, > + uint32_t cpupool_id, > struct xen_sysctl_arinc653_schedule *schedule); > > +#define xc_sched_arinc653_schedule_get(xch, schedule) \ > + xc_sched_arinc653_schedule_get_v2(xch, 0, schedule) > + > int > -xc_sched_arinc653_schedule_get( > +xc_sched_arinc653_schedule_get_v2( > xc_interface *xch, > + uint32_t cpupool_id, > struct xen_sysctl_arinc653_schedule *schedule); > > /**