]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/xen.git/commitdiff
libxenevtchn: rename evtchn_port_or_errot_t as xenevtchn_port...
authorIan Campbell <ian.campbell@citrix.com>
Thu, 4 Feb 2016 13:00:29 +0000 (13:00 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 4 Feb 2016 15:19:30 +0000 (15:19 +0000)
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>
Tested-by: Olaf Hering <olaf@aepfle.de>
Acked-by: Wei Liu <wei.liu2@citrix.com>
tools/console/daemon/io.c
tools/libs/evtchn/freebsd.c
tools/libs/evtchn/include/xenevtchn.h
tools/libs/evtchn/linux.c
tools/libs/evtchn/minios.c
tools/libs/evtchn/netbsd.c
tools/libs/evtchn/solaris.c
tools/libvchan/init.c
tools/libxl/libxl_event.c
tools/ocaml/libs/eventchn/xeneventchn_stubs.c

index 34666c43ab5697798f7d6cae88137b5bc71ce36e..7e6a886d92b25ad884f4e7a520251b18e6f3cbc6 100644 (file)
@@ -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;
index ead2e71a9e80a130ed4aed6131ef269912294055..30eaa705ac8c852ec2d4851880fe4a3cdc5b4a3d 100644 (file)
@@ -62,7 +62,7 @@ int xenevtchn_notify(xenevtchn_handle *xce, evtchn_port_t port)
     return ioctl(fd, IOCTL_EVTCHN_NOTIFY, &notify);
 }
 
-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;
index 0fa3f84b32cff83389ebd804529552b626c1001f..93b80cb1199eae52454d260c34cf5da7ae5c7b64 100644 (file)
@@ -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);
 
 /*
index 0a3c6e12c6cb6f9a5f5dc618d7bb00818ad182d4..a581c5d316765c92008e51bd096f56cb92fe7dd4 100644 (file)
@@ -64,7 +64,7 @@ int xenevtchn_notify(xenevtchn_handle *xce, evtchn_port_t port)
     return ioctl(fd, IOCTL_EVTCHN_NOTIFY, &notify);
 }
 
-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;
index 2c899520fb982fb6180895903092aaa6db235197..ccf37f081a113582cf92447f3a2b023b887abdbb 100644 (file)
@@ -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;
index 77ae51fe0db93ac1f0255079719cca2429b3eabb..114c6e6bc418b9d9ac6e652ad266c2562c95a4de 100644 (file)
@@ -62,7 +62,7 @@ int xenevtchn_notify(xenevtchn_handle *xce, evtchn_port_t port)
     return ioctl(fd, IOCTL_EVTCHN_NOTIFY, &notify);
 }
 
-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;
index b4720cd041ed831fc511e32cd1f92ae1f24108c2..dc249aa0139280d64af40e0f54edcd4f798cd755 100644 (file)
@@ -65,7 +65,7 @@ int xenevtchn_notify(xenevtchn_handle *xce, evtchn_port_t port)
     return ioctl(fd, IOCTL_EVTCHN_NOTIFY, &notify);
 }
 
-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;
index cadd12c7be7e1bbcd5677bbc0a05c92f46c3ef43..83e1deec44b692988c375f76aac7f907af29ce8f 100644 (file)
@@ -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)
index 85483651bcb411c9a5b17b2f5b4cf669c642ba63..02b39e6da8c65c033c99a22db4784de8d7aeeb7a 100644 (file)
@@ -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;
index c2d4737d2fa0d087848570b6488b8849bfe32952..b711fd8bbd342bdba9d2ef08edf9efb373dc8a10 100644 (file)
@@ -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)