[PATCH 3/4] score: Add RTEMS_ALIGNED()

Sebastian Huber sebastian.huber at embedded-brains.de
Mon Jan 25 11:05:55 UTC 2016


---
 cpukit/score/include/rtems/score/basedefs.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/cpukit/score/include/rtems/score/basedefs.h b/cpukit/score/include/rtems/score/basedefs.h
index 6b57b26..ea7d8c7 100644
--- a/cpukit/score/include/rtems/score/basedefs.h
+++ b/cpukit/score/include/rtems/score/basedefs.h
@@ -207,6 +207,15 @@
   #define RTEMS_PACKED
 #endif
 
+/**
+ * @brief Instructs the compiler to enforce the specified alignment.
+ */
+#if defined(__GNUC__)
+  #define RTEMS_ALIGNED( _alignment ) __attribute__((__aligned__(_alignment)))
+#else
+  #define RTEMS_ALIGNED( _alignment )
+#endif
+
 /* Provided for backward compatibility */
 #define RTEMS_COMPILER_PACKED_ATTRIBUTE RTEMS_PACKED
 
-- 
1.8.4.5




More information about the devel mailing list