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

[Xen-devel] [PATCH 07/10] Xen: Support for sched_op hypercall



Adds support for CPU yield operation until event arrives.

Signed-off-by: Daniel Castro <evil.dani@xxxxxxxxx>
---
 src/xen.h |   41 +++++++++++++++++++++++++++++++++++++++++
 1 files changed, 41 insertions(+), 0 deletions(-)

diff --git a/src/xen.h b/src/xen.h
index de2b1ef..b70593a 100644
--- a/src/xen.h
+++ b/src/xen.h
@@ -188,6 +188,7 @@ __DEFINE_XEN_GUEST_HANDLE(u32, u32);
 
 #define __HYPERVISOR_memory_op            12
 #define __HYPERVISOR_xen_version          17
+#define __HYPERVISOR_sched_op             29
 #define __HYPERVISOR_event_channel_op     32
 #define __HYPERVISOR_hvm_op               34
 
@@ -236,6 +237,42 @@ struct evtchn_send {
 typedef struct evtchn_send evtchn_send_t;
 
 /******************************************************************************
+ * sched.h
+ *
+ * Scheduler state interactions
+ *
+ * Copyright (c) 2005, Keir Fraser <keir@xxxxxxxxxxxxx>
+ */
+
+
+
+/*
+ * Poll a set of event-channel ports. Return when one or more are pending. An
+ * optional timeout may be specified.
+ * @arg == pointer to sched_poll structure.
+ */
+#define SCHEDOP_poll        3
+struct sched_poll {
+    XEN_GUEST_HANDLE(evtchn_port_t) ports;
+    unsigned int nr_ports;
+    u64 timeout;
+};
+typedef struct sched_poll sched_poll_t;
+DEFINE_XEN_GUEST_HANDLE(sched_poll_t);
+
+/*
+ * Error base
+ */
+#define        EPERM            1      /* Operation not permitted */
+#define        ENOENT           2      /* No such file or directory */
+#define        EIO              5      /* I/O error */
+#define        EACCES          13      /* Permission denied */
+#define        EINVAL          22      /* Invalid argument */
+#define        ENOSYS          38      /* Function not implemented */
+#define        EISCONN         106     /* Transport endpoint is already 
connected */
+
+
+/******************************************************************************
  * memory.h
  *
  * Memory reservation and information.
@@ -285,5 +322,9 @@ static inline int hypercall_memory_op(int cmd ,void *arg)
 {
        return _hypercall2(int, memory_op, cmd ,arg);
 }
+static inline int hypercall_sched_op(int cmd, void *arg)
+{
+       return _hypercall2(int, sched_op, cmd, arg);
+}
 
 #endif
-- 
1.7.4.1


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.