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

[Xen-changelog] [xen master] have __DEFINE_COMPAT_HANDLE() generate const versions



commit 698d0f377d72fdc8d4e247e76b6508090c366187
Author:     Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx>
AuthorDate: Mon Sep 5 12:47:46 2016 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Mon Sep 5 12:47:46 2016 +0200

    have __DEFINE_COMPAT_HANDLE() generate const versions
    
    Both DEFINE_XEN_GUEST_HANDLE() and __DEFINE_XEN_GUEST_HANDLE()
    each produce both const and non-const handles,
    only DEFINE_COMPAT_HANDLE() does (__DEFINE_COMPAT_HANDLE()
    does not). This patch has __DEFINE_COMPAT_HANDLE() also
    produce a const handle.
    
    Suggested-by: Jan Beulich <jbeulich@xxxxxxxx>
    Signed-off-by: Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx>
    Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
---
 xen/include/xen/compat.h | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/xen/include/xen/compat.h b/xen/include/xen/compat.h
index 3f4cef6..ce913ac 100644
--- a/xen/include/xen/compat.h
+++ b/xen/include/xen/compat.h
@@ -15,11 +15,14 @@
     typedef struct { \
         compat_ptr_t c; \
         type *_[0] __packed; \
-    } __compat_handle_ ## name
+    } __compat_handle_ ## name; \
+    typedef struct { \
+        compat_ptr_t c; \
+        const type *_[0] __packed; \
+    } __compat_handle_const_ ## name
 
 #define DEFINE_COMPAT_HANDLE(name) \
-    __DEFINE_COMPAT_HANDLE(name, name); \
-    __DEFINE_COMPAT_HANDLE(const_ ## name, const name)
+    __DEFINE_COMPAT_HANDLE(name, name)
 #define COMPAT_HANDLE(name)          __compat_handle_ ## name
 
 /* NB: it is assumed that if an arch uses the compat layer it does not
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

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