summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-10-16 08:13:15 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-10-26 09:13:19 +0100
commit2423857f38d21aa71da0d127fbc9a4ce511dc20e (patch)
tree4a23e8ed76f1aa39a396c8ffca80bbe7bca20e4c /cpukit
parentRFS: Fix resource leak (diff)
downloadrtems-2423857f38d21aa71da0d127fbc9a4ce511dc20e.tar.bz2
basedefs.h: Add compiler attributes
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/score/include/rtems/score/basedefs.h41
1 files changed, 40 insertions, 1 deletions
diff --git a/cpukit/score/include/rtems/score/basedefs.h b/cpukit/score/include/rtems/score/basedefs.h
index 695ab8fa4f..8e145f58e6 100644
--- a/cpukit/score/include/rtems/score/basedefs.h
+++ b/cpukit/score/include/rtems/score/basedefs.h
@@ -10,7 +10,7 @@
* COPYRIGHT (c) 1989-2007.
* On-Line Applications Research Corporation (OAR).
*
- * Copyright (c) 2010 embedded brains GmbH.
+ * Copyright (c) 2010-2015 embedded brains GmbH.
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
@@ -187,6 +187,25 @@
#endif
/**
+ * @brief Instructs the compiler to place a specific variable or function in
+ * the specified section.
+ */
+#if defined(__GNUC__)
+ #define RTEMS_SECTION( _section ) __attribute__((__section__(_section)))
+#else
+ #define RTEMS_SECTION( _section )
+#endif
+
+/**
+ * @brief Instructs the compiler that a specific variable or function is used.
+ */
+#if defined(__GNUC__)
+ #define RTEMS_USED __attribute__((__used__))
+#else
+ #define RTEMS_USED
+#endif
+
+/**
* Instructs the compiler that a specific variable is deliberately unused.
* This can occur when reading volatile device memory or skipping arguments
* in a variable argument method.
@@ -316,6 +335,26 @@ extern void RTEMS_DEQUALIFY_types_not_compatible(void);
#endif /*RTEMS_DEQUALIFY_DEPTHX*/
#endif /*RTEMS_DEQUALIFY*/
+/**
+ * @brief Concatenates _x and _y without expanding.
+ */
+#define RTEMS_CONCAT( _x, _y ) _x##_y
+
+/**
+ * @brief Concatenates expansion of _x and expansion of _y.
+ */
+#define RTEMS_XCONCAT( _x, _y ) RTEMS_CONCAT( _x, _y )
+
+/**
+ * @brief Stringifies _x without expanding.
+ */
+#define RTEMS_STRING( _x ) #_x
+
+/**
+ * @brief Stringifies expansion of _x.
+ */
+#define RTEMS_XSTRING( _x ) RTEMS_STRING( _x )
+
#ifndef ASM
#ifdef RTEMS_DEPRECATED_TYPES
typedef bool boolean;