]> granicus.if.org Git - libatomic_ops/commitdiff
Fix generalized store_release_write for double-wide type on x64 (GCC)
authorIvan Maidanski <ivmai@mail.ru>
Mon, 8 Apr 2013 18:33:25 +0000 (22:33 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Mon, 8 Apr 2013 18:33:25 +0000 (22:33 +0400)
* src/atomic_ops/generalize-small.template
(AO_XSIZE_store_release_write): Move store-write-based definition down
to follow AO_XSIZE_store_write one (since AO_double_store is currently
defined via CAS for gcc/x64).
* src/atomic_ops/generalize-small.h: Regenerate.

src/atomic_ops/generalize-small.h
src/atomic_ops/generalize-small.template

index 805fc46b75e23072a8886317ae4812b8f8d4aa07..37d1d219d666eb148787d8ed09db7986c706bc66 100644 (file)
 # define AO_HAVE_char_store_write
 #endif
 
-#if defined(AO_HAVE_char_store_write) \
-    && !defined(AO_HAVE_char_store_release_write)
-# define AO_char_store_release_write(addr, val) \
-                                AO_char_store_write(addr, val)
-# define AO_HAVE_char_store_release_write
-#endif
-
 #if defined(AO_HAVE_char_compare_and_swap_write) \
     && !defined(AO_HAVE_char_store_write)
   AO_INLINE void
 # define AO_HAVE_char_store_write
 #endif
 
+#if defined(AO_HAVE_char_store_write) \
+    && !defined(AO_HAVE_char_store_release_write)
+# define AO_char_store_release_write(addr, val) \
+                                AO_char_store_write(addr, val)
+# define AO_HAVE_char_store_release_write
+#endif
+
 #if defined(AO_HAVE_char_store_release) && defined(AO_HAVE_nop_full) \
     && !defined(AO_HAVE_char_store_full)
 # define AO_char_store_full(addr, val) \
 # define AO_HAVE_short_store_write
 #endif
 
-#if defined(AO_HAVE_short_store_write) \
-    && !defined(AO_HAVE_short_store_release_write)
-# define AO_short_store_release_write(addr, val) \
-                                AO_short_store_write(addr, val)
-# define AO_HAVE_short_store_release_write
-#endif
-
 #if defined(AO_HAVE_short_compare_and_swap_write) \
     && !defined(AO_HAVE_short_store_write)
   AO_INLINE void
 # define AO_HAVE_short_store_write
 #endif
 
+#if defined(AO_HAVE_short_store_write) \
+    && !defined(AO_HAVE_short_store_release_write)
+# define AO_short_store_release_write(addr, val) \
+                                AO_short_store_write(addr, val)
+# define AO_HAVE_short_store_release_write
+#endif
+
 #if defined(AO_HAVE_short_store_release) && defined(AO_HAVE_nop_full) \
     && !defined(AO_HAVE_short_store_full)
 # define AO_short_store_full(addr, val) \
 # define AO_HAVE_int_store_write
 #endif
 
-#if defined(AO_HAVE_int_store_write) \
-    && !defined(AO_HAVE_int_store_release_write)
-# define AO_int_store_release_write(addr, val) \
-                                AO_int_store_write(addr, val)
-# define AO_HAVE_int_store_release_write
-#endif
-
 #if defined(AO_HAVE_int_compare_and_swap_write) \
     && !defined(AO_HAVE_int_store_write)
   AO_INLINE void
 # define AO_HAVE_int_store_write
 #endif
 
+#if defined(AO_HAVE_int_store_write) \
+    && !defined(AO_HAVE_int_store_release_write)
+# define AO_int_store_release_write(addr, val) \
+                                AO_int_store_write(addr, val)
+# define AO_HAVE_int_store_release_write
+#endif
+
 #if defined(AO_HAVE_int_store_release) && defined(AO_HAVE_nop_full) \
     && !defined(AO_HAVE_int_store_full)
 # define AO_int_store_full(addr, val) \
 # define AO_HAVE_store_write
 #endif
 
-#if defined(AO_HAVE_store_write) \
-    && !defined(AO_HAVE_store_release_write)
-# define AO_store_release_write(addr, val) \
-                                AO_store_write(addr, val)
-# define AO_HAVE_store_release_write
-#endif
-
 #if defined(AO_HAVE_compare_and_swap_write) \
     && !defined(AO_HAVE_store_write)
   AO_INLINE void
 # define AO_HAVE_store_write
 #endif
 
+#if defined(AO_HAVE_store_write) \
+    && !defined(AO_HAVE_store_release_write)
+# define AO_store_release_write(addr, val) \
+                                AO_store_write(addr, val)
+# define AO_HAVE_store_release_write
+#endif
+
 #if defined(AO_HAVE_store_release) && defined(AO_HAVE_nop_full) \
     && !defined(AO_HAVE_store_full)
 # define AO_store_full(addr, val) \
 # define AO_HAVE_double_store_write
 #endif
 
-#if defined(AO_HAVE_double_store_write) \
-    && !defined(AO_HAVE_double_store_release_write)
-# define AO_double_store_release_write(addr, val) \
-                                AO_double_store_write(addr, val)
-# define AO_HAVE_double_store_release_write
-#endif
-
 #if defined(AO_HAVE_double_compare_and_swap_write) \
     && !defined(AO_HAVE_double_store_write)
   AO_INLINE void
 # define AO_HAVE_double_store_write
 #endif
 
+#if defined(AO_HAVE_double_store_write) \
+    && !defined(AO_HAVE_double_store_release_write)
+# define AO_double_store_release_write(addr, val) \
+                                AO_double_store_write(addr, val)
+# define AO_HAVE_double_store_release_write
+#endif
+
 #if defined(AO_HAVE_double_store_release) && defined(AO_HAVE_nop_full) \
     && !defined(AO_HAVE_double_store_full)
 # define AO_double_store_full(addr, val) \
index 8bb343230ed201b1b396808856e372ea676ef5be..ac916a5834e2c4f4d350383ae0f7a523b2ef2ad6 100644 (file)
 # define AO_HAVE_XSIZE_store_write
 #endif
 
-#if defined(AO_HAVE_XSIZE_store_write) \
-    && !defined(AO_HAVE_XSIZE_store_release_write)
-# define AO_XSIZE_store_release_write(addr, val) \
-                                AO_XSIZE_store_write(addr, val)
-# define AO_HAVE_XSIZE_store_release_write
-#endif
-
 #if defined(AO_HAVE_XSIZE_compare_and_swap_write) \
     && !defined(AO_HAVE_XSIZE_store_write)
   AO_INLINE void
 # define AO_HAVE_XSIZE_store_write
 #endif
 
+#if defined(AO_HAVE_XSIZE_store_write) \
+    && !defined(AO_HAVE_XSIZE_store_release_write)
+# define AO_XSIZE_store_release_write(addr, val) \
+                                AO_XSIZE_store_write(addr, val)
+# define AO_HAVE_XSIZE_store_release_write
+#endif
+
 #if defined(AO_HAVE_XSIZE_store_release) && defined(AO_HAVE_nop_full) \
     && !defined(AO_HAVE_XSIZE_store_full)
 # define AO_XSIZE_store_full(addr, val) \