Do not expose AO_GCC_FORCE_HAVE_CAS macro to client code
authorIvan Maidanski <ivmai@mail.ru>
Tue, 5 Dec 2017 21:28:33 +0000 (00:28 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Fri, 22 Dec 2017 07:43:08 +0000 (10:43 +0300)
(code refactoring)

* src/atomic_ops/sysdeps/gcc/aarch64.h (AO_GCC_FORCE_HAVE_CAS,
AO_GCC_HAVE_double_SYNC_CAS): Undefine at the end of file.
* src/atomic_ops/sysdeps/gcc/hexagon.h (AO_GCC_FORCE_HAVE_CAS,
AO_GCC_HAVE_double_SYNC_CAS): Likewise.
* src/atomic_ops/sysdeps/gcc/mips.h (AO_GCC_FORCE_HAVE_CAS): Likewise.
* src/atomic_ops/sysdeps/gcc/x86.h (AO_GCC_FORCE_HAVE_CAS): Likewise.

src/atomic_ops/sysdeps/gcc/aarch64.h
src/atomic_ops/sysdeps/gcc/hexagon.h
src/atomic_ops/sysdeps/gcc/mips.h
src/atomic_ops/sysdeps/gcc/x86.h

index 97d6ea6..08680ce 100644 (file)
 
 #include "generic.h"
 
+#undef AO_GCC_FORCE_HAVE_CAS
+#undef AO_GCC_HAVE_double_SYNC_CAS
 #undef AO_SKIPATOMIC_double_load
 #undef AO_SKIPATOMIC_double_load_acquire
index 19b348b..ca0d897 100644 (file)
@@ -135,3 +135,6 @@ AO_fetch_compare_and_swap(volatile AO_t *addr, AO_t old_val, AO_t new_val)
 #define AO_T_IS_INT
 
 #endif /* AO_DISABLE_GCC_ATOMICS */
+
+#undef AO_GCC_FORCE_HAVE_CAS
+#undef AO_GCC_HAVE_double_SYNC_CAS
index 9024542..d7a3620 100644 (file)
@@ -189,6 +189,7 @@ AO_fetch_compare_and_swap(volatile AO_t *addr, AO_t old, AO_t new_val)
 /* generated automatically (and AO_int_... primitives are       */
 /* defined properly after the first generalization pass).       */
 
+#undef AO_GCC_FORCE_HAVE_CAS
 #undef AO_MIPS_LL
 #undef AO_MIPS_LL_1
 #undef AO_MIPS_SC
index 28b0f17..f1e927f 100644 (file)
@@ -571,6 +571,7 @@ AO_fetch_compare_and_swap_full(volatile AO_t *addr, AO_t old_val,
 # include "generic.h"
 #endif
 
+#undef AO_GCC_FORCE_HAVE_CAS
 #undef AO_SKIPATOMIC_double_compare_and_swap_ANY
 #undef AO_SKIPATOMIC_double_load
 #undef AO_SKIPATOMIC_double_load_acquire