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

[PATCH xenbus 04/12] Use Windows types in XEN_API event channel functions



From: Paul Durrant <pdurrant@xxxxxxxxxx>

Other XEN_API functions use Windows types rather than Xen types in most cases.
There is no good reason why functions related to event channels need expose
types such as 'domid_t' or 'evtchn_port_t' to callers, especially when the
callers already use USHORT and ULONG types (respectively) for those quantities.

No functional change.

Signed-off-by: Paul Durrant <pdurrant@xxxxxxxxxx>
---
 include/xen.h           | 24 ++++++++++++------------
 src/xen/event_channel.c | 30 +++++++++++++++---------------
 src/xenbus/evtchn.c     | 16 ++++++++--------
 3 files changed, 35 insertions(+), 35 deletions(-)

diff --git a/include/xen.h b/include/xen.h
index 2b74fe691e41..c2babc0c0280 100644
--- a/include/xen.h
+++ b/include/xen.h
@@ -153,48 +153,48 @@ __checkReturn
 XEN_API
 NTSTATUS
 EventChannelSend(
-    IN  evtchn_port_t   Port
+    IN  ULONG   Port
     );
 
 __checkReturn
 XEN_API
 NTSTATUS
 EventChannelAllocateUnbound(
-    IN  domid_t         Domain,
-    OUT evtchn_port_t   *Port
+    IN  USHORT  Domain,
+    OUT ULONG   *Port
     );
 
 __checkReturn
 XEN_API
 NTSTATUS
 EventChannelBindInterDomain(
-    IN  domid_t         RemoteDomain,
-    IN  evtchn_port_t   RemotePort,
-    OUT evtchn_port_t   *LocalPort
+    IN  USHORT  RemoteDomain,
+    IN  ULONG   RemotePort,
+    OUT ULONG   *LocalPort
     );
 
 __checkReturn
 XEN_API
 NTSTATUS
 EventChannelBindVirq(
-    IN  uint32_t        Virq,
-    OUT evtchn_port_t   *LocalPort
+    IN  ULONG   Virq,
+    OUT ULONG   *LocalPort
     );
 
 __checkReturn
 XEN_API
 NTSTATUS
 EventChannelQueryInterDomain(
-    IN  evtchn_port_t   LocalPort,
-    OUT domid_t         *RemoteDomain,
-    OUT evtchn_port_t   *RemotePort
+    IN  ULONG   LocalPort,
+    OUT USHORT  *RemoteDomain,
+    OUT ULONG   *RemotePort
     );
 
 __checkReturn
 XEN_API
 NTSTATUS
 EventChannelClose(
-    IN  evtchn_port_t   LocalPort
+    IN  ULONG   LocalPort
     );
 
 __checkReturn
diff --git a/src/xen/event_channel.c b/src/xen/event_channel.c
index aa9fb4859c7b..c2ce6a241c8b 100644
--- a/src/xen/event_channel.c
+++ b/src/xen/event_channel.c
@@ -51,7 +51,7 @@ __checkReturn
 XEN_API
 NTSTATUS
 EventChannelSend(
-    IN  evtchn_port_t   LocalPort
+    IN  ULONG           LocalPort
     )
 {
     struct evtchn_send  op;
@@ -79,8 +79,8 @@ __checkReturn
 XEN_API
 NTSTATUS
 EventChannelAllocateUnbound(
-    IN  domid_t                 Domain,
-    OUT evtchn_port_t           *LocalPort
+    IN  USHORT                  Domain,
+    OUT ULONG                   *LocalPort
     )
 {
     struct evtchn_alloc_unbound op;
@@ -111,9 +111,9 @@ __checkReturn
 XEN_API
 NTSTATUS
 EventChannelBindInterDomain(
-    IN  domid_t                     RemoteDomain,
-    IN  evtchn_port_t               RemotePort,
-    OUT evtchn_port_t               *LocalPort
+    IN  USHORT                      RemoteDomain,
+    IN  ULONG                       RemotePort,
+    OUT ULONG                       *LocalPort
     )
 {
     struct evtchn_bind_interdomain  op;
@@ -144,8 +144,8 @@ __checkReturn
 XEN_API
 NTSTATUS
 EventChannelBindVirq(
-    IN  uint32_t            Virq,
-    OUT evtchn_port_t       *LocalPort
+    IN  ULONG               Virq,
+    OUT ULONG               *LocalPort
     )
 {
     struct evtchn_bind_virq op;
@@ -176,14 +176,14 @@ __checkReturn
 XEN_API
 NTSTATUS
 EventChannelQueryInterDomain(
-    IN  evtchn_port_t               LocalPort,
-    OUT domid_t                     *RemoteDomain,
-    OUT evtchn_port_t               *RemotePort
+    IN  ULONG               LocalPort,
+    OUT USHORT              *RemoteDomain,
+    OUT ULONG               *RemotePort
     )
 {
-    struct evtchn_status            op;
-    LONG_PTR                        rc;
-    NTSTATUS                        status;
+    struct evtchn_status    op;
+    LONG_PTR                rc;
+    NTSTATUS                status;
 
     op.dom = DOMID_SELF;
     op.port = LocalPort;
@@ -217,7 +217,7 @@ __checkReturn
 XEN_API
 NTSTATUS
 EventChannelClose(
-    IN  evtchn_port_t   LocalPort
+    IN  ULONG           LocalPort
     )
 {
     struct evtchn_close op;
diff --git a/src/xenbus/evtchn.c b/src/xenbus/evtchn.c
index d0546c067639..8c8c1648d007 100644
--- a/src/xenbus/evtchn.c
+++ b/src/xenbus/evtchn.c
@@ -1074,8 +1074,8 @@ EvtchnReset(
         Console.LocalPort = (ULONG)Value;
 
     if (Store.LocalPort != 0) {
-        domid_t         RemoteDomain;
-        evtchn_port_t   RemotePort;
+        USHORT  RemoteDomain;
+        ULONG   RemotePort;
 
         status = EventChannelQueryInterDomain(Store.LocalPort,
                                               &RemoteDomain,
@@ -1092,8 +1092,8 @@ EvtchnReset(
     }
 
     if (Console.LocalPort != 0) {
-        domid_t         RemoteDomain;
-        evtchn_port_t   RemotePort;
+        USHORT  RemoteDomain;
+        ULONG   RemotePort;
 
         status = EventChannelQueryInterDomain(Console.LocalPort,
                                               &RemoteDomain,
@@ -1113,8 +1113,8 @@ EvtchnReset(
     LogPrintf(LOG_LEVEL_INFO, "EVTCHN_RESET: RESET\n");
 
     if (Store.LocalPort != 0) {
-        domid_t         RemoteDomain;
-        evtchn_port_t   RemotePort;
+        USHORT  RemoteDomain;
+        ULONG   RemotePort;
 
         RemoteDomain = Store.Parameters.InterDomain.RemoteDomain;
         RemotePort = Store.Parameters.InterDomain.RemotePort;
@@ -1134,8 +1134,8 @@ EvtchnReset(
     }
 
     if (Console.LocalPort != 0) {
-        domid_t         RemoteDomain;
-        evtchn_port_t   RemotePort;
+        USHORT  RemoteDomain;
+        ULONG   RemotePort;
 
         RemoteDomain = Console.Parameters.InterDomain.RemoteDomain;
         RemotePort = Console.Parameters.InterDomain.RemotePort;
-- 
2.17.1




 


Rackspace

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