diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2016-04-02 06:24:34 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2016-04-02 06:24:34 +0000 |
commit | 9fd8d44b069214fe9043cd38e0777bad2c33c911 (patch) | |
tree | bc2022445f3c6e2facf7be10f76e2bee68f82588 /os/rt/include | |
parent | ba153ec697fcee120e2995ee9007b6351b117b2c (diff) | |
download | ChibiOS-9fd8d44b069214fe9043cd38e0777bad2c33c911.tar.gz ChibiOS-9fd8d44b069214fe9043cd38e0777bad2c33c911.tar.bz2 ChibiOS-9fd8d44b069214fe9043cd38e0777bad2c33c911.zip |
Moved thread macros in chthreads.h.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9200 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/rt/include')
-rw-r--r-- | os/rt/include/chschd.h | 53 | ||||
-rw-r--r-- | os/rt/include/chthreads.h | 53 |
2 files changed, 53 insertions, 53 deletions
diff --git a/os/rt/include/chschd.h b/os/rt/include/chschd.h index 4f94f406b..aa49adcff 100644 --- a/os/rt/include/chschd.h +++ b/os/rt/include/chschd.h @@ -106,59 +106,6 @@ flag. */
/** @} */
-/**
- * @name Working Areas
- */
-/**
- * @brief Calculates the total Working Area size.
- *
- * @param[in] n the stack size to be assigned to the thread
- * @return The total used memory in bytes.
- *
- * @api
- */
-#define THD_WORKING_AREA_SIZE(n) \
- MEM_ALIGN_NEXT(sizeof(thread_t) + PORT_WA_SIZE(n), PORT_STACK_ALIGN)
-
-/**
- * @brief Static working area allocation.
- * @details This macro is used to allocate a static thread working area
- * aligned as both position and size.
- *
- * @param[in] s the name to be assigned to the stack array
- * @param[in] n the stack size to be assigned to the thread
- *
- * @api
- */
-#define THD_WORKING_AREA(s, n) PORT_WORKING_AREA(s, n)
-
-/**
- * @brief Base of a working area casted to the correct type.
- *
- * @param[in] s name of the working area
- */
-#define THD_WORKING_AREA_BASE(s) ((stkalign_t *)(s))
-
-/**
- * @brief End of a working area casted to the correct type.
- *
- * @param[in] s name of the working area
- */
-#define THD_WORKING_AREA_END(s) (THD_WORKING_AREA_BASE(s) + \
- (sizeof (s) / sizeof (stkalign_t)))
-/** @} */
-
-/**
- * @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)
-/** @} */
-
/*===========================================================================*/
/* Module pre-compile time settings. */
/*===========================================================================*/
diff --git a/os/rt/include/chthreads.h b/os/rt/include/chthreads.h index a6342ce66..47d7c2672 100644 --- a/os/rt/include/chthreads.h +++ b/os/rt/include/chthreads.h @@ -121,6 +121,59 @@ typedef struct { /** @} */
/**
+ * @name Working Areas
+ */
+/**
+ * @brief Calculates the total Working Area size.
+ *
+ * @param[in] n the stack size to be assigned to the thread
+ * @return The total used memory in bytes.
+ *
+ * @api
+ */
+#define THD_WORKING_AREA_SIZE(n) \
+ MEM_ALIGN_NEXT(sizeof(thread_t) + PORT_WA_SIZE(n), PORT_STACK_ALIGN)
+
+/**
+ * @brief Static working area allocation.
+ * @details This macro is used to allocate a static thread working area
+ * aligned as both position and size.
+ *
+ * @param[in] s the name to be assigned to the stack array
+ * @param[in] n the stack size to be assigned to the thread
+ *
+ * @api
+ */
+#define THD_WORKING_AREA(s, n) PORT_WORKING_AREA(s, n)
+
+/**
+ * @brief Base of a working area casted to the correct type.
+ *
+ * @param[in] s name of the working area
+ */
+#define THD_WORKING_AREA_BASE(s) ((stkalign_t *)(s))
+
+/**
+ * @brief End of a working area casted to the correct type.
+ *
+ * @param[in] s name of the working area
+ */
+#define THD_WORKING_AREA_END(s) (THD_WORKING_AREA_BASE(s) + \
+ (sizeof (s) / sizeof (stkalign_t)))
+/** @} */
+
+/**
+ * @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
* @{
*/
|