io: make shared ring pad field less enticing for users by adding a __ prefix
authorKeir Fraser <keir.fraser@citrix.com>
Fri, 2 Jul 2010 17:58:28 +0000 (18:58 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Fri, 2 Jul 2010 17:58:28 +0000 (18:58 +0100)
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Daniel Stodden <daniel.stodden@citrix.com>
Cc: Dongxiao Xu <dongxiao.xu@intel.com>
xen/include/public/io/ring.h

index 0c01339722266b31a02602ff0411e2287d746907..38b70519a941a2e24a573267c9c23e706c7c95cf 100644 (file)
@@ -112,7 +112,7 @@ struct __name##_sring {                                                 \
         } tapif_user;                                                   \
         uint8_t pvt_pad[4];                                             \
     } private;                                                          \
-    uint8_t pad[44];                                                    \
+    uint8_t __pad[44];                                                  \
     union __name##_sring_entry ring[1]; /* variable-length */           \
 };                                                                      \
                                                                         \
@@ -156,7 +156,8 @@ typedef struct __name##_back_ring __name##_back_ring_t
 #define SHARED_RING_INIT(_s) do {                                       \
     (_s)->req_prod  = (_s)->rsp_prod  = 0;                              \
     (_s)->req_event = (_s)->rsp_event = 1;                              \
-    (void)memset((_s)->pad, 0, sizeof((_s)->pad));                      \
+    (void)memset((_s)->private.pvt_pad, 0, sizeof((_s)->private.pvt_pad)); \
+    (void)memset((_s)->__pad, 0, sizeof((_s)->__pad));                  \
 } while(0)
 
 #define FRONT_RING_INIT(_r, _s, __size) do {                            \