From 0ebe2197de4a26baa17c1cab6e4319ac32145cbf Mon Sep 17 00:00:00 2001 From: Paul Durrant Date: Fri, 27 Nov 2015 15:18:47 +0000 Subject: [PATCH] Update interfaces. Interface versions seem to have got out of sync. Signed-off-by: Paul Durrant --- include/evtchn_interface.h | 36 ++++++++++++++++++++++++-- include/unplug_interface.h | 53 +++++++++++++++++++------------------- 2 files changed, 61 insertions(+), 28 deletions(-) diff --git a/include/evtchn_interface.h b/include/evtchn_interface.h index 6f8fe42..a9952d6 100644 --- a/include/evtchn_interface.h +++ b/include/evtchn_interface.h @@ -180,6 +180,20 @@ typedef VOID IN PXENBUS_EVTCHN_CHANNEL Channel ); +/*! \typedef XENBUS_EVTCHN_WAIT + \brief Wait for an event to the local end of the channel + + \param Interface The interface header + \param Channel The channel handle + \param Timeout An optional timeout value (similar to KeWaitForSingleObject(), but non-zero values are allowed at DISPATCH_LEVEL). +*/ +typedef NTSTATUS +(*XENBUS_EVTCHN_WAIT)( + IN PINTERFACE Interface, + IN PXENBUS_EVTCHN_CHANNEL Channel, + IN PLARGE_INTEGER Timeout OPTIONAL + ); + /*! \typedef XENBUS_EVTCHN_GET_PORT \brief Get the local port number bound to the channel @@ -276,7 +290,25 @@ struct _XENBUS_EVTCHN_INTERFACE_V4 { XENBUS_EVTCHN_CLOSE EvtchnClose; }; -typedef struct _XENBUS_EVTCHN_INTERFACE_V4 XENBUS_EVTCHN_INTERFACE, *PXENBUS_EVTCHN_INTERFACE; +/*! \struct _XENBUS_EVTCHN_INTERFACE_V5 + \brief EVTCHN interface version 5 + \ingroup interfaces +*/ +struct _XENBUS_EVTCHN_INTERFACE_V5 { + INTERFACE Interface; + XENBUS_EVTCHN_ACQUIRE EvtchnAcquire; + XENBUS_EVTCHN_RELEASE EvtchnRelease; + XENBUS_EVTCHN_OPEN EvtchnOpen; + XENBUS_EVTCHN_BIND EvtchnBind; + XENBUS_EVTCHN_UNMASK EvtchnUnmask; + XENBUS_EVTCHN_SEND EvtchnSend; + XENBUS_EVTCHN_TRIGGER EvtchnTrigger; + XENBUS_EVTCHN_WAIT EvtchnWait; + XENBUS_EVTCHN_GET_PORT EvtchnGetPort; + XENBUS_EVTCHN_CLOSE EvtchnClose; +}; + +typedef struct _XENBUS_EVTCHN_INTERFACE_V5 XENBUS_EVTCHN_INTERFACE, *PXENBUS_EVTCHN_INTERFACE; /*! \def XENBUS_EVTCHN \brief Macro at assist in method invocation @@ -287,7 +319,7 @@ typedef struct _XENBUS_EVTCHN_INTERFACE_V4 XENBUS_EVTCHN_INTERFACE, *PXENBUS_EVT #endif // _WINDLL #define XENBUS_EVTCHN_INTERFACE_VERSION_MIN 1 -#define XENBUS_EVTCHN_INTERFACE_VERSION_MAX 4 +#define XENBUS_EVTCHN_INTERFACE_VERSION_MAX 5 #endif // _XENBUS_EVTCHN_INTERFACE_H diff --git a/include/unplug_interface.h b/include/unplug_interface.h index 99d4e7d..83b3dc9 100644 --- a/include/unplug_interface.h +++ b/include/unplug_interface.h @@ -1,31 +1,31 @@ /* Copyright (c) Citrix Systems Inc. * All rights reserved. - * - * Redistribution and use in source and binary forms, - * with or without modification, are permitted provided + * + * Redistribution and use in source and binary forms, + * with or without modification, are permitted provided * that the following conditions are met: - * - * * Redistributions of source code must retain the above - * copyright notice, this list of conditions and the + * + * * Redistributions of source code must retain the above + * copyright notice, this list of conditions and the * following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the - * following disclaimer in the documentation and/or other + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the + * following disclaimer in the documentation and/or other * materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND - * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ @@ -44,7 +44,7 @@ \brief Acquire a reference to the UNPLUG interface \param Interface The interface header -*/ +*/ typedef NTSTATUS (*XENBUS_UNPLUG_ACQUIRE)( IN PINTERFACE Interface @@ -54,7 +54,7 @@ typedef NTSTATUS \brief Release a reference to the UNPLUG interface \param Interface The interface header -*/ +*/ typedef VOID (*XENBUS_UNPLUG_RELEASE)( IN PINTERFACE Interface @@ -76,7 +76,7 @@ typedef enum _XENBUS_UNPLUG_DEVICE_TYPE { \param Type The type of device \param Make Set to TRUE if the request is being made, FALSE if it is being revoked. -*/ +*/ typedef VOID (*XENBUS_UNPLUG_REQUEST)( IN PINTERFACE Interface, @@ -113,3 +113,4 @@ typedef struct _XENBUS_UNPLUG_INTERFACE_V1 XENBUS_UNPLUG_INTERFACE, *PXENBUS_UNP #define XENBUS_UNPLUG_INTERFACE_VERSION_MAX 1 #endif // _XENBUS_UNPLUG_INTERFACE_H + -- 2.39.5