summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/system.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/score/include/rtems/system.h')
-rw-r--r--cpukit/score/include/rtems/system.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/cpukit/score/include/rtems/system.h b/cpukit/score/include/rtems/system.h
index 22895adb25..6f3f04ec29 100644
--- a/cpukit/score/include/rtems/system.h
+++ b/cpukit/score/include/rtems/system.h
@@ -102,6 +102,17 @@ extern "C" {
#endif
/*
+ * The following macro is a compiler specific way to ensure that memory
+ * writes are not reordered around certian points. This specifically can
+ * impact interrupt disable and thread dispatching critical sections.
+ */
+#ifdef __GNUC__
+ #define RTEMS_COMPILER_MEMORY_BARRIER() asm volatile("" ::: "memory")
+#else
+ #define RTEMS_COMPILER_MEMORY_BARRIER()
+#endif
+
+/*
* The following are used by the POSIX implementation to catch bad paths.
*/