@@ -101,8 +101,8 @@ struct domain {
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;
@@ -868,7 +868,7 @@ static void handle_tty_write(struct domain *dom)
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;
@@ -914,7 +914,7 @@ static void handle_hv_logs(xenevtchn_handle *xce_handle, bool force)
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;
@@ -1005,7 +1005,7 @@ static void reset_fds(void)
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;
@@ -62,7 +62,7 @@ int xenevtchn_notify(xenevtchn_handle *xce, 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 ret, fd = xce->fd;
struct ioctl_evtchn_bind_unbound_port bind;
@@ -73,7 +73,7 @@ evtchn_port_or_error_t xenevtchn_bind_unbound_port(xenevtchn_handle *xce, uint32
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;
@@ -86,7 +86,7 @@ xenevtchn_bind_interdomain(xenevtchn_handle *xce, uint32_t domid, evtchn_port_t
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;
@@ -107,7 +107,7 @@ int xenevtchn_unbind(xenevtchn_handle *xce, evtchn_port_t port)
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;
@@ -28,7 +28,7 @@
#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;
@@ -101,14 +101,14 @@ int xenevtchn_notify(xenevtchn_handle *xce, evtchn_port_t port);
* 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);
@@ -116,7 +116,7 @@ xenevtchn_bind_interdomain(xenevtchn_handle *xce, uint32_t domid,
* 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);
/*
@@ -142,7 +142,7 @@ int xenevtchn_unbind(xenevtchn_handle *xce, evtchn_port_t port);
* 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);
/*
@@ -64,7 +64,7 @@ int xenevtchn_notify(xenevtchn_handle *xce, evtchn_port_t port)
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;
@@ -75,7 +75,7 @@ evtchn_port_or_error_t xenevtchn_bind_unbound_port(xenevtchn_handle *xce,
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)
{
@@ -88,7 +88,7 @@ evtchn_port_or_error_t xenevtchn_bind_interdomain(xenevtchn_handle *xce,
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;
@@ -109,7 +109,7 @@ int xenevtchn_unbind(xenevtchn_handle *xce, evtchn_port_t port)
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;
@@ -128,7 +128,7 @@ static void evtchn_handler(evtchn_port_t port, struct pt_regs *regs, void *data)
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;
@@ -155,7 +155,7 @@ evtchn_port_or_error_t xenevtchn_bind_unbound_port(xenevtchn_handle *xce, uint32
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;
@@ -199,7 +199,7 @@ int xenevtchn_unbind(xenevtchn_handle *xce, evtchn_port_t port)
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;
@@ -224,7 +224,7 @@ evtchn_port_or_error_t xenevtchn_bind_virq(xenevtchn_handle *xce, unsigned int v
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;
@@ -62,7 +62,7 @@ int xenevtchn_notify(xenevtchn_handle *xce, 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;
@@ -77,7 +77,7 @@ evtchn_port_or_error_t xenevtchn_bind_unbound_port(xenevtchn_handle * xce, uint3
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;
@@ -104,7 +104,7 @@ int xenevtchn_unbind(xenevtchn_handle *xce, evtchn_port_t port)
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;
@@ -119,7 +119,7 @@ evtchn_port_or_error_t xenevtchn_bind_virq(xenevtchn_handle *xce, unsigned int v
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;
@@ -65,7 +65,7 @@ int xenevtchn_notify(xenevtchn_handle *xce, 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;
@@ -75,7 +75,7 @@ evtchn_port_or_error_t xenevtchn_bind_unbound_port(xenevtchn_handle *xce, uint32
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;
@@ -87,7 +87,7 @@ evtchn_port_or_error_t xenevtchn_bind_interdomain(xenevtchn_handle *xce, uint32_
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;
@@ -107,7 +107,7 @@ int xenevtchn_unbind(xenevtchn_handle *xce, evtchn_port_t port)
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;
@@ -215,7 +215,7 @@ static int init_gnt_cli(struct libxenvchan *ctrl, int domain, uint32_t ring_ref)
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)
@@ -348,7 +348,7 @@ out:
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)
@@ -719,7 +719,7 @@ static void evtchn_fd_callback(libxl__egc *egc, libxl__ev_fd *ev,
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;
@@ -81,7 +81,7 @@ CAMLprim value stub_eventchn_bind_interdomain(value xce, value domid,
{
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)
@@ -95,7 +95,7 @@ CAMLprim value stub_eventchn_bind_dom_exc_virq(value xce)
{
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)
@@ -121,7 +121,7 @@ CAMLprim value stub_eventchn_pending(value xce)
{
CAMLparam1(xce);
CAMLlocal1(result);
- evtchn_port_or_error_t port;
+ xenevtchn_port_or_error_t port;
port = xenevtchn_pending(_H(xce));
if (port == -1)
Otherwise the name clashes with the libxc evtchn_compat use of the name (which is compat, so can't really change), and triggers an error with older gcc relating to redefining typedefs (which are not allowed per the spec, but which are tolerated by newer gcc) None of qemu-trad, qemu-xen or mini-os actually use this type, so this should be fine. Note that the library API is not actually stable until 4.7 is releases. Reported-by: Olaf Hering <olaf@aepfle.de> Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Cc: Andrew Cooper <andrew.cooper3@citrix.com> Cc: Olaf Hering <olaf@aepfle.de> --- v2: New approach instwad of "tools: libxc: do not redefine evtchn_port_or_error_t in xc_evtchn_compat.c" --- tools/console/daemon/io.c | 10 +++++----- tools/libs/evtchn/freebsd.c | 8 ++++---- tools/libs/evtchn/include/xenevtchn.h | 10 +++++----- tools/libs/evtchn/linux.c | 8 ++++---- tools/libs/evtchn/minios.c | 8 ++++---- tools/libs/evtchn/netbsd.c | 8 ++++---- tools/libs/evtchn/solaris.c | 8 ++++---- tools/libvchan/init.c | 4 ++-- tools/libxl/libxl_event.c | 2 +- tools/ocaml/libs/eventchn/xeneventchn_stubs.c | 6 +++--- 10 files changed, 36 insertions(+), 36 deletions(-)