WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] libxc: osdep: convert xc_evtchn_bind_inte

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] libxc: osdep: convert xc_evtchn_bind_interdomain()
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 24 Dec 2010 15:45:54 -0800
Delivery-date: Fri, 24 Dec 2010 15:48:08 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1291369007 0
# Node ID c40b8c5b1c45abf197a6b922149879dd5262c363
# Parent  7637af0d22976a3a84461e6ccdc6f29a9f81504f
libxc: osdep: convert xc_evtchn_bind_interdomain()

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Signed-off-by: Ian Jackson <ian.jackson.citrix.com>
---
 tools/libxc/xc_evtchn.c    |    7 +++++++
 tools/libxc/xc_linux.c     |   12 +++++++-----
 tools/libxc/xc_minios.c    |   12 +++++++-----
 tools/libxc/xc_netbsd.c    |   12 +++++++-----
 tools/libxc/xc_solaris.c   |    6 ++++--
 tools/libxc/xenctrlosdep.h |    2 ++
 6 files changed, 34 insertions(+), 17 deletions(-)

diff -r 7637af0d2297 -r c40b8c5b1c45 tools/libxc/xc_evtchn.c
--- a/tools/libxc/xc_evtchn.c   Fri Dec 03 09:36:47 2010 +0000
+++ b/tools/libxc/xc_evtchn.c   Fri Dec 03 09:36:47 2010 +0000
@@ -94,6 +94,13 @@ xc_evtchn_bind_unbound_port(xc_evtchn *x
     return xce->ops->u.evtchn.bind_unbound_port(xce, xce->ops_handle, domid);
 }
 
+evtchn_port_or_error_t
+xc_evtchn_bind_interdomain(xc_evtchn *xce, int domid,
+                           evtchn_port_t remote_port)
+{
+    return xce->ops->u.evtchn.bind_interdomain(xce, xce->ops_handle, domid, 
remote_port);
+}
+
 /*
  * Local variables:
  * mode: C
diff -r 7637af0d2297 -r c40b8c5b1c45 tools/libxc/xc_linux.c
--- a/tools/libxc/xc_linux.c    Fri Dec 03 09:36:47 2010 +0000
+++ b/tools/libxc/xc_linux.c    Fri Dec 03 09:36:47 2010 +0000
@@ -386,16 +386,17 @@ linux_evtchn_bind_unbound_port(xc_evtchn
     return ioctl(fd, IOCTL_EVTCHN_BIND_UNBOUND_PORT, &bind);
 }
 
-evtchn_port_or_error_t
-xc_evtchn_bind_interdomain(xc_evtchn *xce, int domid,
-                           evtchn_port_t remote_port)
-{
+static evtchn_port_or_error_t
+linux_evtchn_bind_interdomain(xc_evtchn *xce, xc_osdep_handle h, int domid,
+                              evtchn_port_t remote_port)
+{
+    int fd = (int)h;
     struct ioctl_evtchn_bind_interdomain bind;
 
     bind.remote_domain = domid;
     bind.remote_port = remote_port;
 
-    return ioctl(xce->fd, IOCTL_EVTCHN_BIND_INTERDOMAIN, &bind);
+    return ioctl(fd, IOCTL_EVTCHN_BIND_INTERDOMAIN, &bind);
 }
 
 evtchn_port_or_error_t
@@ -441,6 +442,7 @@ static struct xc_osdep_ops linux_evtchn_
         .fd = &linux_evtchn_fd,
         .notify = &linux_evtchn_notify,
         .bind_unbound_port = &linux_evtchn_bind_unbound_port,
+        .bind_interdomain = &linux_evtchn_bind_interdomain,
     },
 };
 
diff -r 7637af0d2297 -r c40b8c5b1c45 tools/libxc/xc_minios.c
--- a/tools/libxc/xc_minios.c   Fri Dec 03 09:36:47 2010 +0000
+++ b/tools/libxc/xc_minios.c   Fri Dec 03 09:36:47 2010 +0000
@@ -302,27 +302,28 @@ static evtchn_port_or_error_t minios_evt
     return port;
 }
 
-evtchn_port_or_error_t xc_evtchn_bind_interdomain(xc_evtchn *xce, int domid,
+static evtchn_port_or_error_t minios_evtchn_bind_interdomain(xc_evtchn *xce, 
xc_osdep_handle h, int domid,
     evtchn_port_t remote_port)
 {
+    int fd = (int)h;
     evtchn_port_t local_port;
     int ret, i;
 
     assert(get_current() == main_thread);
-    i = port_alloc(xce->fd);
+    i = port_alloc(fd);
     if (i == -1)
        return -1;
 
     printf("xc_evtchn_bind_interdomain(%d, %"PRId32")", domid, remote_port);
-    ret = evtchn_bind_interdomain(domid, remote_port, evtchn_handler, 
(void*)(intptr_t)xce->fd, &local_port);
+    ret = evtchn_bind_interdomain(domid, remote_port, evtchn_handler, 
(void*)(intptr_t)fd, &local_port);
     printf(" = %d\n", ret);
 
     if (ret < 0) {
        errno = -ret;
        return -1;
     }
-    files[xce->fd].evtchn.ports[i].bound = 1;
-    files[xce->fd].evtchn.ports[i].port = local_port;
+    files[fd].evtchn.ports[i].bound = 1;
+    files[fd].evtchn.ports[i].port = local_port;
     unmask_evtchn(local_port);
     return local_port;
 }
@@ -406,6 +407,7 @@ static struct xc_osdep_ops minios_evtchn
         .fd = &minios_evtchn_fd,
         .notify = &minios_evtchn_notify,
         .bind_unbound_port = &minios_evtchn_bind_unbound_port,
+        .bind_interdomain = &minios_evtchn_bind_interdomain,
     },
 };
 
diff -r 7637af0d2297 -r c40b8c5b1c45 tools/libxc/xc_netbsd.c
--- a/tools/libxc/xc_netbsd.c   Fri Dec 03 09:36:47 2010 +0000
+++ b/tools/libxc/xc_netbsd.c   Fri Dec 03 09:36:47 2010 +0000
@@ -241,17 +241,18 @@ netbsd_evtchn_bind_unbound_port(xc_evtch
        return -1;
 }
 
-evtchn_port_or_error_t
-xc_evtchn_bind_interdomain(xc_evtchn *xce, int domid,
-                           evtchn_port_t remote_port)
-{
+static evtchn_port_or_error_t
+netbsd_evtchn_bind_interdomain(xc_evtchn *xce, xc_osdep_handle h, int domid,
+                               evtchn_port_t remote_port)
+{
+    int fd = (int)h;
     struct ioctl_evtchn_bind_interdomain bind;
     int ret;
 
     bind.remote_domain = domid;
     bind.remote_port = remote_port;
 
-    ret = ioctl(xce->fd, IOCTL_EVTCHN_BIND_INTERDOMAIN, &bind);
+    ret = ioctl(fd, IOCTL_EVTCHN_BIND_INTERDOMAIN, &bind);
     if (ret == 0)
        return bind.port;
     else
@@ -306,6 +307,7 @@ static struct xc_osdep_ops netbsd_evtchn
          .fd = &netbsd_evtchn_fd,
          .notify = &netbsd_evtchn_notify,
          .bind_unbound_port = &netbsd_evtchn_bind_unbound_port,
+         .bind_interdomain = &netbsd_evtchn_bind_interdomain,
     },
 };
 
diff -r 7637af0d2297 -r c40b8c5b1c45 tools/libxc/xc_solaris.c
--- a/tools/libxc/xc_solaris.c  Fri Dec 03 09:36:47 2010 +0000
+++ b/tools/libxc/xc_solaris.c  Fri Dec 03 09:36:47 2010 +0000
@@ -229,15 +229,16 @@ solaris_evtchn_bind_unbound_port(xc_evtc
 }
 
 evtchn_port_or_error_t
-xc_evtchn_bind_interdomain(xc_evtchn *xce, int domid,
+solaris_evtchn_bind_interdomain(xc_evtchn *xce, xc_osdep_handle h, int domid,
                            evtchn_port_t remote_port)
 {
+    int fd = (int)h;
     struct ioctl_evtchn_bind_interdomain bind;
 
     bind.remote_domain = domid;
     bind.remote_port = remote_port;
 
-    return ioctl(xce->fd, IOCTL_EVTCHN_BIND_INTERDOMAIN, &bind);
+    return ioctl(fd, IOCTL_EVTCHN_BIND_INTERDOMAIN, &bind);
 }
 
 evtchn_port_or_error_t
@@ -283,6 +284,7 @@ static struct xc_osdep_ops solaris_evtch
         .fd = &solaris_evtchn_fd,
         .notify = &solaris_evtchn_notify,
         .bind_unbound_port = &solaris_evtchn_bind_unbound_port,
+        .bind_interdomain = &solaris_evtchn_bind_interdomain,
     },
 };
 
diff -r 7637af0d2297 -r c40b8c5b1c45 tools/libxc/xenctrlosdep.h
--- a/tools/libxc/xenctrlosdep.h        Fri Dec 03 09:36:47 2010 +0000
+++ b/tools/libxc/xenctrlosdep.h        Fri Dec 03 09:36:47 2010 +0000
@@ -80,6 +80,8 @@ struct xc_osdep_ops
             int (*notify)(xc_evtchn *xce, xc_osdep_handle h, evtchn_port_t 
port);
 
             evtchn_port_or_error_t (*bind_unbound_port)(xc_evtchn *xce, 
xc_osdep_handle h, int domid);
+            evtchn_port_or_error_t (*bind_interdomain)(xc_evtchn *xce, 
xc_osdep_handle h, int domid,
+                                                       evtchn_port_t 
remote_port);
         } evtchn;
     } u;
 };

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] libxc: osdep: convert xc_evtchn_bind_interdomain(), Xen patchbot-unstable <=