From: Ivan Maidanski <ivmai@mail.ru>
Date: Sun, 13 Jan 2013 16:04:36 +0000 (+0400)
Subject: Fix read_ordered.h inclusion for ARM
X-Git-Tag: libatomic_ops-7_2e~22
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=53f2152e00d4bf7d395f9de408c71ee2aa9a9bc4;p=libatomic_ops

Fix read_ordered.h inclusion for ARM

* src/atomic_ops/sysdeps/armcc/arm_v6.h: Move include of read_ordered.h
down to the end of the file to be after AO_load/store definition
(since read_ordered.h depends on these primitives).
* src/atomic_ops/sysdeps/gcc/arm.h: Likewise.
* src/atomic_ops/sysdeps/msftc/arm.h: Likewise.

Conflicts:

	src/atomic_ops/sysdeps/armcc/arm_v6.h
	src/atomic_ops/sysdeps/gcc/arm.h
	src/atomic_ops/sysdeps/msftc/arm.h
---

diff --git a/src/atomic_ops/sysdeps/armcc/arm_v6.h b/src/atomic_ops/sysdeps/armcc/arm_v6.h
index fd6113d..2ce4bef 100644
--- a/src/atomic_ops/sysdeps/armcc/arm_v6.h
+++ b/src/atomic_ops/sysdeps/armcc/arm_v6.h
@@ -19,7 +19,7 @@
  * modified is included with the above copyright notice.
  *
  */
-#include "../read_ordered.h"
+
 #include "../test_and_set_t_is_ao_t.h" /* Probably suboptimal */
 
 #if __TARGET_ARCH_ARM < 6
@@ -232,3 +232,5 @@ AO_compare_double_and_swap_double(volatile AO_double_t *addr,
 #define AO_HAVE_compare_double_and_swap_double
 
 #endif // __TARGET_ARCH_ARM
+
+#include "../read_ordered.h"
diff --git a/src/atomic_ops/sysdeps/gcc/arm.h b/src/atomic_ops/sysdeps/gcc/arm.h
index 0d7a93f..dd47eb7 100644
--- a/src/atomic_ops/sysdeps/gcc/arm.h
+++ b/src/atomic_ops/sysdeps/gcc/arm.h
@@ -15,8 +15,6 @@
  *
  */
 
-#include "../read_ordered.h"
-
 #include "../test_and_set_t_is_ao_t.h" /* Probably suboptimal */
 
 /* NEC LE-IT: ARMv6 is the first architecture providing support for     */
@@ -354,3 +352,5 @@ AO_compare_and_swap(volatile AO_t *addr, AO_t old_val, AO_t new_val)
   }
 # define AO_HAVE_test_and_set_full
 #endif /* !AO_HAVE_test_and_set[_full] */
+
+#include "../read_ordered.h"
diff --git a/src/atomic_ops/sysdeps/msftc/arm.h b/src/atomic_ops/sysdeps/msftc/arm.h
index 9391cee..927d686 100644
--- a/src/atomic_ops/sysdeps/msftc/arm.h
+++ b/src/atomic_ops/sysdeps/msftc/arm.h
@@ -20,8 +20,6 @@
  * SOFTWARE.
  */
 
-#include "../read_ordered.h"
-
 #ifndef AO_ASSUME_WINDOWS98
   /* CAS is always available */
 # define AO_ASSUME_WINDOWS98
@@ -90,3 +88,5 @@ AO_store_full(volatile AO_t *addr, AO_t value)
 /* AO_test_and_set_full() is emulated using CAS.                        */
 
 #endif /* _M_ARM < 6 */
+
+#include "../read_ordered.h"