summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-01-25 10:20:14 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-01-26 09:07:23 +0100
commitcd9ef18564af6cdbd2ab65bb16e184e17aa43702 (patch)
tree04304908d05933d6b77f21f4b49c4c54da04744e /cpukit
parentsparc64: No explicit align of _CPU_Null_fp_context (diff)
downloadrtems-cd9ef18564af6cdbd2ab65bb16e184e17aa43702.tar.bz2
score: Add RTEMS_ALIGNED()
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/score/include/rtems/score/basedefs.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/cpukit/score/include/rtems/score/basedefs.h b/cpukit/score/include/rtems/score/basedefs.h
index 7e282c1883..25f505897d 100644
--- a/cpukit/score/include/rtems/score/basedefs.h
+++ b/cpukit/score/include/rtems/score/basedefs.h
@@ -235,6 +235,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