diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-09-13 11:24:38 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-09-13 11:24:38 +0000 |
commit | 1a2e19d5d6161df4c7b385bc03ed761e0e27e825 (patch) | |
tree | dee4b5a33495ffd6f8a8bea55632b32d0ca78edf /os/rt | |
parent | a86b48c578db236dddea8f141db7607741d48e57 (diff) | |
download | ChibiOS-1a2e19d5d6161df4c7b385bc03ed761e0e27e825.tar.gz ChibiOS-1a2e19d5d6161df4c7b385bc03ed761e0e27e825.tar.bz2 ChibiOS-1a2e19d5d6161df4c7b385bc03ed761e0e27e825.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6299 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/rt')
-rw-r--r-- | os/rt/include/chthreads.h | 11 | ||||
-rw-r--r-- | os/rt/ports/ARMCMx/compilers/GCC/chtypes.h | 5 |
2 files changed, 16 insertions, 0 deletions
diff --git a/os/rt/include/chthreads.h b/os/rt/include/chthreads.h index 6da6b6518..1dcad9b48 100644 --- a/os/rt/include/chthreads.h +++ b/os/rt/include/chthreads.h @@ -148,6 +148,17 @@ typedef msg_t (*tfunc_t)(void *); /** @} */
/**
+ * @name Threads abstraction macros
+ */
+/**
+ * @brief Thread declaration macro.
+ * @note Thread declarations should be performed using this macro because
+ * the port layer could define optimizations for thread functions.
+ */
+#define THD_FUNCTION(tname, arg) PORT_THD_FUNCTION(tname, arg)
+/** @} */
+
+/**
* @name Macro Functions
* @{
*/
diff --git a/os/rt/ports/ARMCMx/compilers/GCC/chtypes.h b/os/rt/ports/ARMCMx/compilers/GCC/chtypes.h index 1cf45c99b..61052a46d 100644 --- a/os/rt/ports/ARMCMx/compilers/GCC/chtypes.h +++ b/os/rt/ports/ARMCMx/compilers/GCC/chtypes.h @@ -79,6 +79,11 @@ typedef uint32_t ucnt_t; /**< Generic unsigned counter. */ */
#define NOINLINE __attribute__((noinline))
+/**
+ * @brief Optimized thread function declaration macro.
+ */
+#define PORT_THD_FUNCTION(tname, arg) msg_t tname(void *arg)
+
#endif /* _CHTYPES_H_ */
/** @} */
|