]> granicus.if.org Git - libatomic_ops/commitdiff
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 97d6ea6bc6d4891d9ff867d2f84dfecea762f552..08680ce282b8e59ef85f692ff0f9999b34f861e2 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 19b348bb9e54e269756c57686aceb81cf1b8b122..ca0d8975c2196335c02d08a1d2d72b64a52de9a3 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 9024542a85b5efdc59c13f4f32d8ca660b85ea52..d7a36208085876ea86c116b8d1bdb162e47d8158 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 28b0f1769423c464ecc6494f395982f6c3fb0876..f1e927fed1b4a3e91670a1cda473fa99be6bddfc 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