]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Fix atomic queue alignment on 32bit systems
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 5 May 2022 22:27:21 +0000 (00:27 +0200)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sat, 7 May 2022 22:27:21 +0000 (17:27 -0500)
src/lib/io/atomic_queue.c

index af23678ff5625c968543ac03afca1a779bcb5d44..4c9b7eac8aec45848041939320b3ab29e966ff9f 100644 (file)
@@ -42,8 +42,10 @@ RCSID("$Id$")
  * on different CPU cores.
  */
 typedef struct CC_HINT(packed, aligned(CACHE_LINE_SIZE)) {
+       atomic_int64_t                                  seq;            //!< Must be seq then data to ensure
+                                                                       ///< seq is 64bit aligned for 32bit address
+                                                                       ///< spaces.
        void                                            *data;
-       atomic_int64_t                                  seq;
 } fr_atomic_queue_entry_t;
 
 /** Structure to hold the atomic queue