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

[Xen-devel] [PATCH 3/3] arinc: Add poolid parameter to scheduler get/set functions.



From: Nathan Studer <nate.studer@xxxxxxxxxxxxxxx>

Also create a backwards compatible interface to these functions.

Signed-off-by: Nathan Studer <nate.studer@xxxxxxxxxxxxxxx>
---
 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);
 
 /**
-- 
1.7.9.5


_______________________________________________
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®.