[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] libxc: osdep: convert xc_evtchn_notify()



# HG changeset patch
# User Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1291369007 0
# Node ID e1593440f73c4a3474820312d9076f40c0a69b77
# Parent  935755b3b2311e88acfe7a94a02cb25cfda4ff23
libxc: osdep: convert xc_evtchn_notify()

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

diff -r 935755b3b231 -r e1593440f73c 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
@@ -82,3 +82,18 @@ int xc_evtchn_fd(xc_evtchn *xce)
 {
     return xce->ops->u.evtchn.fd(xce, xce->ops_handle);
 }
+
+int xc_evtchn_notify(xc_evtchn *xce, evtchn_port_t port)
+{
+    return xce->ops->u.evtchn.notify(xce, xce->ops_handle, port);
+}
+
+/*
+ * Local variables:
+ * mode: C
+ * c-set-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff -r 935755b3b231 -r e1593440f73c 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
@@ -365,13 +365,14 @@ static int linux_evtchn_fd(xc_evtchn *xc
     return (int)h;
 }
 
-int xc_evtchn_notify(xc_evtchn *xce, evtchn_port_t port)
-{
+static int linux_evtchn_notify(xc_evtchn *xce, xc_osdep_handle h, 
evtchn_port_t port)
+{
+    int fd = (int)h;
     struct ioctl_evtchn_notify notify;
 
     notify.port = port;
 
-    return ioctl(xce->fd, IOCTL_EVTCHN_NOTIFY, &notify);
+    return ioctl(fd, IOCTL_EVTCHN_NOTIFY, &notify);
 }
 
 evtchn_port_or_error_t
@@ -437,6 +438,7 @@ static struct xc_osdep_ops linux_evtchn_
 
     .u.evtchn = {
         .fd = &linux_evtchn_fd,
+        .notify = &linux_evtchn_notify,
     },
 };
 
diff -r 935755b3b231 -r e1593440f73c 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
@@ -231,7 +231,7 @@ static int minios_evtchn_fd(xc_evtchn *x
     return (int)h;
 }
 
-int xc_evtchn_notify(xc_evtchn *xce, evtchn_port_t port)
+static int minios_evtchn_notify(xc_evtchn *xce, xc_osdep_handle h, 
evtchn_port_t port)
 {
     int ret;
 
@@ -403,6 +403,7 @@ static struct xc_osdep_ops minios_evtchn
 
     .u.evtchn = {
         .fd = &minios_evtchn_fd,
+        .notify = &minios_evtchn_notify,
     },
 };
 
diff -r 935755b3b231 -r e1593440f73c 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
@@ -215,13 +215,14 @@ static int netbsd_evtchn_fd(xc_evtchn *x
     return (int)h;
 }
 
-int xc_evtchn_notify(xc_evtchn *xce, evtchn_port_t port)
-{
+static int netbsd_evtchn_notify(xc_evtchn *xce, xc_osdep_handle h, 
evtchn_port_t port)
+{
+    int fd = (int)h;
     struct ioctl_evtchn_notify notify;
 
     notify.port = port;
 
-    return ioctl(xce->fd, IOCTL_EVTCHN_NOTIFY, &notify);
+    return ioctl(fd, IOCTL_EVTCHN_NOTIFY, &notify);
 }
 
 evtchn_port_or_error_t
@@ -301,7 +302,8 @@ static struct xc_osdep_ops netbsd_evtchn
     .close = &netbsd_evtchn_close,
 
     .u.evtchn = {
-        .fd = &netbsd_evtchn_fd,
+         .fd = &netbsd_evtchn_fd,
+         .notify = &netbsd_evtchn_notify,
     },
 };
 
diff -r 935755b3b231 -r e1593440f73c 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
@@ -207,13 +207,14 @@ static int solaris_evtchn_fd(xc_evtchn *
     return (int)h;
 }
 
-int xc_evtchn_notify(xc_evtchn *xce, evtchn_port_t port)
-{
+static int solaris_evtchn_notify(xc_evtchn *xce, xc_osdep_handle h, 
evtchn_port_t port)
+{
+    int fd = (int)h;
     struct ioctl_evtchn_notify notify;
 
     notify.port = port;
 
-    return ioctl(xce->fd, IOCTL_EVTCHN_NOTIFY, &notify);
+    return ioctl(fd, IOCTL_EVTCHN_NOTIFY, &notify);
 }
 
 evtchn_port_or_error_t
@@ -279,6 +280,7 @@ static struct xc_osdep_ops solaris_evtch
 
     .u.evtchn = {
         .fd = &solaris_evtchn_fd,
+        .notify = &solaris_evtchn_notify,
     },
 };
 
diff -r 935755b3b231 -r e1593440f73c 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
@@ -76,6 +76,8 @@ struct xc_osdep_ops
         } privcmd;
         struct {
             int (*fd)(xc_evtchn *xce, xc_osdep_handle h);
+
+            int (*notify)(xc_evtchn *xce, xc_osdep_handle h, evtchn_port_t 
port);
         } evtchn;
     } u;
 };

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.