Use standalone private macro to guard against AO_GCC_BARRIER redefinition
authorIvan Maidanski <ivmai@mail.ru>
Wed, 5 Dec 2018 21:43:43 +0000 (00:43 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Mon, 10 Dec 2018 21:42:54 +0000 (00:42 +0300)
(code refactoring)

* src/atomic_ops/sysdeps/loadstore/acquire_release_volatile.h:
Regenerate.
* src/atomic_ops/sysdeps/loadstore/char_acquire_release_volatile.h:
Likewise.
* src/atomic_ops/sysdeps/loadstore/int_acquire_release_volatile.h:
Likewise.
* src/atomic_ops/sysdeps/loadstore/short_acquire_release_volatile.h:
Likewise.
* src/atomic_ops/sysdeps/loadstore/acquire_release_volatile.template
(AO_GCC_BARRIER): Define only if AO_HAVE_GCC_BARRIER is undefined.
* src/atomic_ops/sysdeps/loadstore/acquire_release_volatile.template
[!AO_HAVE_GCC_BARRIER] (AO_HAVE_GCC_BARRIER): Define macro.

src/atomic_ops/sysdeps/loadstore/acquire_release_volatile.h
src/atomic_ops/sysdeps/loadstore/acquire_release_volatile.template
src/atomic_ops/sysdeps/loadstore/char_acquire_release_volatile.h
src/atomic_ops/sysdeps/loadstore/int_acquire_release_volatile.h
src/atomic_ops/sysdeps/loadstore/short_acquire_release_volatile.h

index 3c7341e46c82567a7ac93030b720a4ff365aead6..adbaa9a605ba77c13ca592b9055e249036dad4be 100644 (file)
 /* subexpressions across a volatile load; hence, we now add compiler    */
 /* barriers for gcc.                                                    */
 
-#ifndef AO_GCC_BARRIER
+#ifndef AO_HAVE_GCC_BARRIER
   /* TODO: Check GCC version (if workaround not needed for modern GCC). */
 # if defined(__GNUC__)
 #   define AO_GCC_BARRIER() AO_compiler_barrier()
 # else
 #   define AO_GCC_BARRIER() (void)0
 # endif
+# define AO_HAVE_GCC_BARRIER
 #endif
 
 AO_INLINE AO_t
index a7dfd1523575fcac1d69254d4ea49bfb9c6f9034..95846d61c0e3c17403f57eeb6477f35696004e21 100644 (file)
 /* subexpressions across a volatile load; hence, we now add compiler    */
 /* barriers for gcc.                                                    */
 
-#ifndef AO_GCC_BARRIER
+#ifndef AO_HAVE_GCC_BARRIER
   /* TODO: Check GCC version (if workaround not needed for modern GCC). */
 # if defined(__GNUC__)
 #   define AO_GCC_BARRIER() AO_compiler_barrier()
 # else
 #   define AO_GCC_BARRIER() (void)0
 # endif
+# define AO_HAVE_GCC_BARRIER
 #endif
 
 AO_INLINE XCTYPE
index 1a230585690ac83ec62f6a8b0e4b66edf129a5e1..25438fd0414b35544f5dc34e67e2d6711a553754 100644 (file)
 /* subexpressions across a volatile load; hence, we now add compiler    */
 /* barriers for gcc.                                                    */
 
-#ifndef AO_GCC_BARRIER
+#ifndef AO_HAVE_GCC_BARRIER
   /* TODO: Check GCC version (if workaround not needed for modern GCC). */
 # if defined(__GNUC__)
 #   define AO_GCC_BARRIER() AO_compiler_barrier()
 # else
 #   define AO_GCC_BARRIER() (void)0
 # endif
+# define AO_HAVE_GCC_BARRIER
 #endif
 
 AO_INLINE unsigned/**/char
index 18a7e4b3d244bb5e537c11508cfc7d94f595b4fe..7ab17d95b5bbc860f7a0bea7e39525d87a620e5b 100644 (file)
 /* subexpressions across a volatile load; hence, we now add compiler    */
 /* barriers for gcc.                                                    */
 
-#ifndef AO_GCC_BARRIER
+#ifndef AO_HAVE_GCC_BARRIER
   /* TODO: Check GCC version (if workaround not needed for modern GCC). */
 # if defined(__GNUC__)
 #   define AO_GCC_BARRIER() AO_compiler_barrier()
 # else
 #   define AO_GCC_BARRIER() (void)0
 # endif
+# define AO_HAVE_GCC_BARRIER
 #endif
 
 AO_INLINE unsigned
index 19f7781d2470809a4c79bf02d4731650e223ab3e..36bb2e497f9332bbfc380aa0177214c407275c68 100644 (file)
 /* subexpressions across a volatile load; hence, we now add compiler    */
 /* barriers for gcc.                                                    */
 
-#ifndef AO_GCC_BARRIER
+#ifndef AO_HAVE_GCC_BARRIER
   /* TODO: Check GCC version (if workaround not needed for modern GCC). */
 # if defined(__GNUC__)
 #   define AO_GCC_BARRIER() AO_compiler_barrier()
 # else
 #   define AO_GCC_BARRIER() (void)0
 # endif
+# define AO_HAVE_GCC_BARRIER
 #endif
 
 AO_INLINE unsigned/**/short