You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by so...@apache.org on 2017/05/01 23:25:18 UTC

[trafficserver] 03/05: TS-4872: Simplify atomic list header #ifdefs.

This is an automated email from the ASF dual-hosted git repository.

sorber pushed a commit to branch 6.2.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit e1cc7573b3dc938d708e5552dbae5b57f798860e
Author: James Peach <jp...@apache.org>
AuthorDate: Thu Sep 15 11:56:57 2016 -0700

    TS-4872: Simplify atomic list header #ifdefs.
    
    (cherry picked from commit 19e964cc07441e8a5217964a0bcc080e45d90205)
---
 lib/ts/ink_queue.h | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/lib/ts/ink_queue.h b/lib/ts/ink_queue.h
index 6794fb4..0a5c768 100644
--- a/lib/ts/ink_queue.h
+++ b/lib/ts/ink_queue.h
@@ -85,20 +85,21 @@ void ink_queue_load_64(void *dst, void *src);
 // lock, use INK_QUEUE_LD to read safely.
 typedef union {
 #if (defined(__i386__) || defined(__arm__) || defined(__mips__)) && (SIZEOF_VOIDP == 4)
-  struct {
-    void *pointer;
-    int32_t version;
-  } s;
-  int64_t data;
+  typedef int32_t version_type;
+  typedef int64_t data_type;
 #elif TS_HAS_128BIT_CAS
+  typedef int64_t version_type;
+  typedef __int128_t data_type;
+#else
+  typedef int64_t data_type;
+#endif
+
   struct {
     void *pointer;
-    int64_t version;
+    version_type version;
   } s;
-  __int128_t data;
-#else
-  int64_t data;
-#endif
+
+  data_type data;
 } head_p;
 
 /*

-- 
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>.