struct domain *next;
char *conspath;
int ring_ref;
- evtchn_port_or_error_t local_port;
- evtchn_port_or_error_t remote_port;
+ xenevtchn_port_or_error_t local_port;
+ xenevtchn_port_or_error_t remote_port;
xenevtchn_handle *xce_handle;
int xce_pollfd_idx;
struct xencons_interface *interface;
static void handle_ring_read(struct domain *dom)
{
- evtchn_port_or_error_t port;
+ xenevtchn_port_or_error_t port;
if (dom->is_dead)
return;
char *bufptr = buffer;
unsigned int size;
static uint32_t index = 0;
- evtchn_port_or_error_t port = -1;
+ xenevtchn_port_or_error_t port = -1;
if (!force && ((port = xenevtchn_pending(xce_handle)) == -1))
return;
void handle_io(void)
{
int ret;
- evtchn_port_or_error_t log_hv_evtchn = -1;
+ xenevtchn_port_or_error_t log_hv_evtchn = -1;
int xce_pollfd_idx = -1;
int xs_pollfd_idx = -1;
xenevtchn_handle *xce_handle = NULL;
return ioctl(fd, IOCTL_EVTCHN_NOTIFY, ¬ify);
}
-evtchn_port_or_error_t xenevtchn_bind_unbound_port(xenevtchn_handle *xce, uint32_t domid)
+xenevtchn_port_or_error_t xenevtchn_bind_unbound_port(xenevtchn_handle *xce, uint32_t domid)
{
int ret, fd = xce->fd;
struct ioctl_evtchn_bind_unbound_port bind;
return ( ret == 0 ) ? bind.port : ret;
}
-evtchn_port_or_error_t
+xenevtchn_port_or_error_t
xenevtchn_bind_interdomain(xenevtchn_handle *xce, uint32_t domid, evtchn_port_t remote_port)
{
int ret, fd = xce->fd;
return ( ret == 0 ) ? bind.port : ret;
}
-evtchn_port_or_error_t xenevtchn_bind_virq(xenevtchn_handle *xce, unsigned int virq)
+xenevtchn_port_or_error_t xenevtchn_bind_virq(xenevtchn_handle *xce, unsigned int virq)
{
int ret, fd = xce->fd;
struct ioctl_evtchn_bind_virq bind;
return ioctl(fd, IOCTL_EVTCHN_UNBIND, &unbind);
}
-evtchn_port_or_error_t xenevtchn_pending(xenevtchn_handle *xce)
+xenevtchn_port_or_error_t xenevtchn_pending(xenevtchn_handle *xce)
{
int fd = xce->fd;
evtchn_port_t port;
#include <xen/event_channel.h>
/* A port identifier is guaranteed to fit in 31 bits. */
-typedef int evtchn_port_or_error_t;
+typedef int xenevtchn_port_or_error_t;
typedef struct xenevtchn_handle xenevtchn_handle;
* Returns a new event port awaiting interdomain connection from the given
* domain ID, or -1 on failure, in which case errno will be set appropriately.
*/
-evtchn_port_or_error_t
+xenevtchn_port_or_error_t
xenevtchn_bind_unbound_port(xenevtchn_handle *xce, uint32_t domid);
/*
* Returns a new event port bound to the remote port for the given domain ID,
* or -1 on failure, in which case errno will be set appropriately.
*/
-evtchn_port_or_error_t
+xenevtchn_port_or_error_t
xenevtchn_bind_interdomain(xenevtchn_handle *xce, uint32_t domid,
evtchn_port_t remote_port);
* Bind an event channel to the given VIRQ. Returns the event channel bound to
* the VIRQ, or -1 on failure, in which case errno will be set appropriately.
*/
-evtchn_port_or_error_t
+xenevtchn_port_or_error_t
xenevtchn_bind_virq(xenevtchn_handle *xce, unsigned int virq);
/*
* xenevtchn_unmask (if you want to receive any further
* notifications).
*/
-evtchn_port_or_error_t
+xenevtchn_port_or_error_t
xenevtchn_pending(xenevtchn_handle *xce);
/*
return ioctl(fd, IOCTL_EVTCHN_NOTIFY, ¬ify);
}
-evtchn_port_or_error_t xenevtchn_bind_unbound_port(xenevtchn_handle *xce,
+xenevtchn_port_or_error_t xenevtchn_bind_unbound_port(xenevtchn_handle *xce,
uint32_t domid)
{
int fd = xce->fd;
return ioctl(fd, IOCTL_EVTCHN_BIND_UNBOUND_PORT, &bind);
}
-evtchn_port_or_error_t xenevtchn_bind_interdomain(xenevtchn_handle *xce,
+xenevtchn_port_or_error_t xenevtchn_bind_interdomain(xenevtchn_handle *xce,
uint32_t domid,
evtchn_port_t remote_port)
{
return ioctl(fd, IOCTL_EVTCHN_BIND_INTERDOMAIN, &bind);
}
-evtchn_port_or_error_t xenevtchn_bind_virq(xenevtchn_handle *xce,
+xenevtchn_port_or_error_t xenevtchn_bind_virq(xenevtchn_handle *xce,
unsigned int virq)
{
int fd = xce->fd;
return ioctl(fd, IOCTL_EVTCHN_UNBIND, &unbind);
}
-evtchn_port_or_error_t xenevtchn_pending(xenevtchn_handle *xce)
+xenevtchn_port_or_error_t xenevtchn_pending(xenevtchn_handle *xce)
{
int fd = xce->fd;
evtchn_port_t port;
wake_up(&event_queue);
}
-evtchn_port_or_error_t xenevtchn_bind_unbound_port(xenevtchn_handle *xce, uint32_t domid)
+xenevtchn_port_or_error_t xenevtchn_bind_unbound_port(xenevtchn_handle *xce, uint32_t domid)
{
int fd = xce->fd;
struct evtchn_port_info *port_info;
return port;
}
-evtchn_port_or_error_t xenevtchn_bind_interdomain(xenevtchn_handle *xce, uint32_t domid,
+xenevtchn_port_or_error_t xenevtchn_bind_interdomain(xenevtchn_handle *xce, uint32_t domid,
evtchn_port_t remote_port)
{
int fd = xce->fd;
return -1;
}
-evtchn_port_or_error_t xenevtchn_bind_virq(xenevtchn_handle *xce, unsigned int virq)
+xenevtchn_port_or_error_t xenevtchn_bind_virq(xenevtchn_handle *xce, unsigned int virq)
{
int fd = xce->fd;
struct evtchn_port_info *port_info;
return port;
}
-evtchn_port_or_error_t xenevtchn_pending(xenevtchn_handle *xce)
+xenevtchn_port_or_error_t xenevtchn_pending(xenevtchn_handle *xce)
{
int fd = xce->fd;
struct evtchn_port_info *port_info;
return ioctl(fd, IOCTL_EVTCHN_NOTIFY, ¬ify);
}
-evtchn_port_or_error_t xenevtchn_bind_unbound_port(xenevtchn_handle * xce, uint32_t domid)
+xenevtchn_port_or_error_t xenevtchn_bind_unbound_port(xenevtchn_handle * xce, uint32_t domid)
{
int fd = xce->fd;
struct ioctl_evtchn_bind_unbound_port bind;
return -1;
}
-evtchn_port_or_error_t xenevtchn_bind_interdomain(xenevtchn_handle *xce, uint32_t domid,
+xenevtchn_port_or_error_t xenevtchn_bind_interdomain(xenevtchn_handle *xce, uint32_t domid,
evtchn_port_t remote_port)
{
int fd = xce->fd;
return ioctl(fd, IOCTL_EVTCHN_UNBIND, &unbind);
}
-evtchn_port_or_error_t xenevtchn_bind_virq(xenevtchn_handle *xce, unsigned int virq)
+xenevtchn_port_or_error_t xenevtchn_bind_virq(xenevtchn_handle *xce, unsigned int virq)
{
int fd = xce->fd;
struct ioctl_evtchn_bind_virq bind;
return bind.port;
}
-evtchn_port_or_error_t xenevtchn_pending(xenevtchn_handle *xce)
+xenevtchn_port_or_error_t xenevtchn_pending(xenevtchn_handle *xce)
{
int fd = xce->fd;
evtchn_port_t port;
return ioctl(fd, IOCTL_EVTCHN_NOTIFY, ¬ify);
}
-evtchn_port_or_error_t xenevtchn_bind_unbound_port(xenevtchn_handle *xce, uint32_t domid)
+xenevtchn_port_or_error_t xenevtchn_bind_unbound_port(xenevtchn_handle *xce, uint32_t domid)
{
int fd = xce->fd;
struct ioctl_evtchn_bind_unbound_port bind;
return ioctl(fd, IOCTL_EVTCHN_BIND_UNBOUND_PORT, &bind);
}
-evtchn_port_or_error_t xenevtchn_bind_interdomain(xenevtchn_handle *xce, uint32_t domid,
+xenevtchn_port_or_error_t xenevtchn_bind_interdomain(xenevtchn_handle *xce, uint32_t domid,
evtchn_port_t remote_port)
{
int fd = xce->fd;
return ioctl(fd, IOCTL_EVTCHN_BIND_INTERDOMAIN, &bind);
}
-evtchn_port_or_error_t xenevtchn_bind_virq(xenevtchn_handle *xce, unsigned int virq)
+xenevtchn_port_or_error_t xenevtchn_bind_virq(xenevtchn_handle *xce, unsigned int virq)
{
int fd = xce->fd;
struct ioctl_evtchn_bind_virq bind;
return ioctl(fd, IOCTL_EVTCHN_UNBIND, &unbind);
}
-evtchn_port_or_error_t xenevtchn_pending(xenevtchn_handle *xce)
+xenevtchn_port_or_error_t xenevtchn_pending(xenevtchn_handle *xce)
{
int fd = xce->fd;
evtchn_port_t port;
static int init_evt_srv(struct libxenvchan *ctrl, int domain,
struct xentoollog_logger *logger)
{
- evtchn_port_or_error_t port;
+ xenevtchn_port_or_error_t port;
ctrl->event = xenevtchn_open(logger, 0);
if (!ctrl->event)
static int init_evt_cli(struct libxenvchan *ctrl, int domain,
struct xentoollog_logger *logger)
{
- evtchn_port_or_error_t port;
+ xenevtchn_port_or_error_t port;
ctrl->event = xenevtchn_open(logger, 0);
if (!ctrl->event)
EGC_GC;
libxl__ev_evtchn *evev;
int rc;
- evtchn_port_or_error_t port;
+ xenevtchn_port_or_error_t port;
rc = evtchn_revents_check(egc, revents);
if (rc) return;
{
CAMLparam3(xce, domid, remote_port);
CAMLlocal1(port);
- evtchn_port_or_error_t rc;
+ xenevtchn_port_or_error_t rc;
rc = xenevtchn_bind_interdomain(_H(xce), Int_val(domid), Int_val(remote_port));
if (rc == -1)
{
CAMLparam1(xce);
CAMLlocal1(port);
- evtchn_port_or_error_t rc;
+ xenevtchn_port_or_error_t rc;
rc = xenevtchn_bind_virq(_H(xce), VIRQ_DOM_EXC);
if (rc == -1)
{
CAMLparam1(xce);
CAMLlocal1(result);
- evtchn_port_or_error_t port;
+ xenevtchn_port_or_error_t port;
port = xenevtchn_pending(_H(xce));
if (port == -1)