aboutsummaryrefslogtreecommitdiffstats
path: root/os/rt/include
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2015-06-28 11:40:14 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2015-06-28 11:40:14 +0000
commit8131d84ea72494d9b60b0ad7477a9f63a1b43f94 (patch)
treea6dd7cd11a7c5dd9e08586c7565d0c184e03d775 /os/rt/include
parent32490c00b3f484d228f1a7b80d19213c5c935c9c (diff)
downloadChibiOS-8131d84ea72494d9b60b0ad7477a9f63a1b43f94.tar.gz
ChibiOS-8131d84ea72494d9b60b0ad7477a9f63a1b43f94.tar.bz2
ChibiOS-8131d84ea72494d9b60b0ad7477a9f63a1b43f94.zip
lwIP bindings improvements. Added new function chRegSetThreadNamex().
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8058 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/rt/include')
-rw-r--r--os/rt/include/chregistry.h25
1 files changed, 21 insertions, 4 deletions
diff --git a/os/rt/include/chregistry.h b/os/rt/include/chregistry.h
index ca90f26dd..cfec32eeb 100644
--- a/os/rt/include/chregistry.h
+++ b/os/rt/include/chregistry.h
@@ -148,11 +148,8 @@ extern "C" {
* @return Thread name as a zero terminated string.
* @retval NULL if the thread name has not been set.
*
- * @iclass
*/
-static inline const char *chRegGetThreadNameI(thread_t *tp) {
-
- chDbgCheckClassI();
+static inline const char *chRegGetThreadNameX(thread_t *tp) {
#if CH_CFG_USE_REGISTRY == TRUE
return tp->p_name;
@@ -162,6 +159,26 @@ static inline const char *chRegGetThreadNameI(thread_t *tp) {
#endif
}
+/**
+ * @brief Changes the name of the specified thread.
+ * @pre This function only sets the name if the option
+ * @p CH_CFG_USE_REGISTRY is enabled else it does
+ * nothing.
+ *
+ * @param[in] tp pointer to the thread
+ * @param[in] name name to be set
+ *
+ * @xclass
+ */
+static inline void chRegSetThreadNameX(thread_t *tp, const char *name) {
+
+#if CH_CFG_USE_REGISTRY == TRUE
+ tp->p_name = name;
+#else
+ (void)tp;
+ (void)name;
+#endif
+}
#endif /* CH_CFG_USE_REGISTRY == TRUE */
#endif /* _CHREGISTRY_H_ */