[rtems commit] score: Add RTEMS_WEAK_ALIAS()

Sebastian Huber sebh at rtems.org
Thu Feb 23 07:55:05 UTC 2017


Module:    rtems
Branch:    master
Commit:    c8339709e00e892720b82e44fbe3b5e404285ecd
Changeset: http://git.rtems.org/rtems/commit/?id=c8339709e00e892720b82e44fbe3b5e404285ecd

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue Feb 21 08:58:29 2017 +0100

score: Add RTEMS_WEAK_ALIAS()

---

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

diff --git a/cpukit/score/include/rtems/score/basedefs.h b/cpukit/score/include/rtems/score/basedefs.h
index 22cc246..79bf15e 100644
--- a/cpukit/score/include/rtems/score/basedefs.h
+++ b/cpukit/score/include/rtems/score/basedefs.h
@@ -190,6 +190,16 @@
 #endif
 
 /**
+ * @brief Instructs the compiler to generate a weak alias to the specified
+ * target function.
+ */
+#if defined(__GNUC__)
+  #define RTEMS_WEAK_ALIAS( _target ) __attribute__((__weak__, __alias__(#_target)))
+#else
+  #define RTEMS_WEAK_ALIAS( _target )
+#endif
+
+/**
  * @brief Instructs the compiler to enforce the specified alignment.
  */
 #if defined(__GNUC__)




More information about the vc mailing list