--- /dev/null
+#ifndef XEN_PUBLIC_EVENT_CHANNEL_H
+#define XEN_PUBLIC_EVENT_CHANNEL_H
+
+#define EVTCHNOP_send 4
+
+typedef uint32_t evtchn_port_t;
+
+#endif /* XEN_PUBLIC_EVENT_CHANNEL_H */
+
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
#define __HYPERVISOR_console_io 18
#define __HYPERVISOR_sched_op 29
+#define __HYPERVISOR_event_channel_op 32
/* Commands to HYPERVISOR_console_io */
#define CONSOLEIO_write 0
/* All Xen ABI for includers convenience .*/
#include <xen/xen.h>
#include <xen/sched.h>
+#include <xen/event_channel.h>
/*
* Hypercall primatives, compiled for the correct bitness
return HYPERCALL2(long, sched_op, cmd, arg);
}
+static inline long hypercall_event_channel_op(unsigned int cmd, void *arg)
+{
+ return HYPERCALL2(long, event_channel_op, cmd, arg);
+}
+
/*
* Higher level hypercall helpers
*/
return hypercall_sched_op(SCHEDOP_shutdown, &reason);
}
+static inline void hypercall_yield(void)
+{
+ hypercall_sched_op(SCHEDOP_yield, NULL);
+}
+
+static inline int hypercall_evtchn_send(evtchn_port_t port)
+{
+ return hypercall_event_channel_op(EVTCHNOP_send, &port);
+}
+
#endif /* XTF_HYPERCALL_H */
/*