[PATCH] Add __synch_synchronize function for arm
Jan Sommer
soja-lists at aries.uberspace.de
Sat Aug 1 10:43:12 UTC 2015
From: Jan Sommer <summerspam at web.de>
Fixes link failure when linking Ada programs on the raspberry pi
---
cpukit/score/cpu/arm/Makefile.am | 1 +
cpukit/score/cpu/arm/armv4-sync-synchronize.c | 9 +++++++++
2 files changed, 10 insertions(+)
create mode 100644 cpukit/score/cpu/arm/armv4-sync-synchronize.c
diff --git a/cpukit/score/cpu/arm/Makefile.am b/cpukit/score/cpu/arm/Makefile.am
index c051a48..4b242f0 100644
--- a/cpukit/score/cpu/arm/Makefile.am
+++ b/cpukit/score/cpu/arm/Makefile.am
@@ -27,6 +27,7 @@ libscorecpu_a_SOURCES += arm_exc_handler_high.c
libscorecpu_a_SOURCES += arm-exception-frame-print.c
libscorecpu_a_SOURCES += arm-exception-default.c
libscorecpu_a_SOURCES += armv4-exception-default.S
+libscorecpu_a_SOURCES += armv4-sync-synchronize.c
libscorecpu_a_SOURCES += armv7-thread-idle.c
libscorecpu_a_SOURCES += armv7m-context-initialize.c
libscorecpu_a_SOURCES += armv7m-context-restore.c
diff --git a/cpukit/score/cpu/arm/armv4-sync-synchronize.c b/cpukit/score/cpu/arm/armv4-sync-synchronize.c
new file mode 100644
index 0000000..6fcac05
--- /dev/null
+++ b/cpukit/score/cpu/arm/armv4-sync-synchronize.c
@@ -0,0 +1,9 @@
+void
+__sync_synchronize (void)
+{
+#ifdef ARM_MULTILIB_HAS_BARRIER_INSTRUCTIONS
+ asm volatile("dmb" : : : "memory");
+#else
+ asm volatile("" : : : "memory");
+#endif
+}
\ No newline at end of file
--
2.1.4
More information about the devel
mailing list