summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2019-04-05 08:42:01 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2019-04-09 08:06:46 +0200
commit3c50c3286535730084633b4d960b3aee4d86e455 (patch)
tree1e6b3bdf0dfa429b6e19715fd61b820474f7d89e
parentbsps/arm: Optimize ARMv7-M CPU counter (diff)
downloadrtems-3c50c3286535730084633b4d960b3aee4d86e455.tar.bz2
score: Add RTEMS_CONST
Close #3734.
-rw-r--r--cpukit/include/rtems/score/basedefs.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/cpukit/include/rtems/score/basedefs.h b/cpukit/include/rtems/score/basedefs.h
index 770865bb80..8babc0a448 100644
--- a/cpukit/include/rtems/score/basedefs.h
+++ b/cpukit/include/rtems/score/basedefs.h
@@ -107,6 +107,17 @@
/**
* The following defines a compiler specific attribute which informs
* the compiler that the method has no effect except the return value
+ * and that the return value depends only the value of parameters.
+ */
+#ifdef __GNUC__
+ #define RTEMS_CONST __attribute__((__const__))
+#else
+ #define RTEMS_CONST
+#endif
+
+/**
+ * The following defines a compiler specific attribute which informs
+ * the compiler that the method has no effect except the return value
* and that the return value depends only on parameters and/or global
* variables.
*/