JosiahWI commented on code in PR #13170:
URL: https://github.com/apache/trafficserver/pull/13170#discussion_r3260622619


##########
include/tscore/ink_queue.h:
##########
@@ -71,30 +75,62 @@ void ink_queue_load_64(void *dst, void *src);
 /*
  * Generic Free List Manager
  */
-// Warning: head_p is read and written in multiple threads without a
-// lock, use INK_QUEUE_LD to read safely.
-union head_p {
-  head_p() : data(){};
-
 #if (defined(__i386__) || defined(__arm__) || defined(__mips__)) && 
(SIZEOF_VOIDP == 4)
-  typedef int32_t version_type;
-  typedef int64_t data_type;
+typedef int32_t head_p_version_type;
+typedef int64_t head_p_data_type;
 #elif TS_HAS_128BIT_CAS
-  typedef int64_t    version_type;
-  typedef __int128_t data_type;
+typedef int64_t    head_p_version_type;
+typedef __int128_t head_p_data_type;
 #else
-  using version_type = int64_t;
-  using data_type    = int64_t;
+using head_p_version_type = int64_t;
+using head_p_data_type    = int64_t;
 #endif
 
-  struct {
-    void        *pointer;
-    version_type version;
-  } s;
+// Warning: head_p is read and written in multiple threads without a
+// lock, use INK_QUEUE_LD to read safely.
+using head_p = head_p_data_type;
+
+#if ((defined(__i386__) || defined(__arm__) || defined(__mips__)) && 
(SIZEOF_VOIDP == 4)) || TS_HAS_128BIT_CAS
 
-  data_type data;
+struct head_p_view {
+  void               *pointer;
+  head_p_version_type version;
 };
 
+#elif TS_HAS_128BIT_CAS
+
+struct head_p_view {
+  void               *pointer;
+  head_p_version_type version;
+};
+
+#elif defined(__x86_64__) || defined(__ia64__) || defined(__powerpc64__) || 
defined(__mips64)
+
+struct head_p_view {
+  int vaddr      : 48;
+  int version    : 15;
+  int vaddr_mode : 1;
+};
+#endif

Review Comment:
   I put this here as documentation but didn't use it anywhere. Should I remove 
it?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to