Fixed bug #614.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8081 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
47d047ed99
commit
7cdde62864
|
@ -76,26 +76,6 @@ typedef struct {
|
||||||
/* Module macros. */
|
/* Module macros. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
/**
|
|
||||||
* @name Macro Functions
|
|
||||||
* @{
|
|
||||||
*/
|
|
||||||
/**
|
|
||||||
* @brief Sets the current thread name.
|
|
||||||
* @pre This function only stores the pointer to the name if the option
|
|
||||||
* @p CH_CFG_USE_REGISTRY is enabled else no action is performed.
|
|
||||||
*
|
|
||||||
* @param[in] p thread name as a zero terminated string
|
|
||||||
*
|
|
||||||
* @api
|
|
||||||
*/
|
|
||||||
#define chRegSetThreadName(p) (ch.rlist.r_current->p_name = (p))
|
|
||||||
/** @} */
|
|
||||||
#else /* !CH_CFG_USE_REGISTRY */
|
|
||||||
#define chRegSetThreadName(p)
|
|
||||||
#endif /* !CH_CFG_USE_REGISTRY */
|
|
||||||
|
|
||||||
#if (CH_CFG_USE_REGISTRY == TRUE) || defined(__DOXYGEN__)
|
|
||||||
/**
|
/**
|
||||||
* @brief Removes a thread from the registry list.
|
* @brief Removes a thread from the registry list.
|
||||||
* @note This macro is not meant for use in application code.
|
* @note This macro is not meant for use in application code.
|
||||||
|
@ -134,10 +114,30 @@ extern "C" {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif /* CH_CFG_USE_REGISTRY == TRUE */
|
||||||
|
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
/* Module inline functions. */
|
/* Module inline functions. */
|
||||||
/*===========================================================================*/
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sets the current thread name.
|
||||||
|
* @pre This function only stores the pointer to the name if the option
|
||||||
|
* @p CH_CFG_USE_REGISTRY is enabled else no action is performed.
|
||||||
|
*
|
||||||
|
* @param[in] name thread name as a zero terminated string
|
||||||
|
*
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
static inline void chRegSetThreadName(const char *name) {
|
||||||
|
|
||||||
|
#if CH_CFG_USE_REGISTRY == TRUE
|
||||||
|
ch.rlist.r_current->p_name = name;
|
||||||
|
#else
|
||||||
|
(void)name;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Returns the name of the specified thread.
|
* @brief Returns the name of the specified thread.
|
||||||
* @pre This function only returns the pointer to the name if the option
|
* @pre This function only returns the pointer to the name if the option
|
||||||
|
@ -161,12 +161,11 @@ static inline const char *chRegGetThreadNameX(thread_t *tp) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Changes the name of the specified thread.
|
* @brief Changes the name of the specified thread.
|
||||||
* @pre This function only sets the name if the option
|
* @pre This function only stores the pointer to the name if the option
|
||||||
* @p CH_CFG_USE_REGISTRY is enabled else it does
|
* @p CH_CFG_USE_REGISTRY is enabled else no action is performed.
|
||||||
* nothing.
|
|
||||||
*
|
*
|
||||||
* @param[in] tp pointer to the thread
|
* @param[in] tp pointer to the thread
|
||||||
* @param[in] name name to be set
|
* @param[in] name thread name as a zero terminated string
|
||||||
*
|
*
|
||||||
* @xclass
|
* @xclass
|
||||||
*/
|
*/
|
||||||
|
@ -179,7 +178,6 @@ static inline void chRegSetThreadNameX(thread_t *tp, const char *name) {
|
||||||
(void)name;
|
(void)name;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif /* CH_CFG_USE_REGISTRY == TRUE */
|
|
||||||
|
|
||||||
#endif /* _CHREGISTRY_H_ */
|
#endif /* _CHREGISTRY_H_ */
|
||||||
|
|
||||||
|
|
|
@ -130,9 +130,11 @@ void chSysInit(void) {
|
||||||
#endif
|
#endif
|
||||||
chSysEnable();
|
chSysEnable();
|
||||||
|
|
||||||
|
#if CH_CFG_USE_REGISTRY == TRUE
|
||||||
/* Note, &ch_debug points to the string "main" if the registry is
|
/* Note, &ch_debug points to the string "main" if the registry is
|
||||||
active, else the parameter is ignored.*/
|
active.*/
|
||||||
chRegSetThreadName((const char *)&ch_debug);
|
chRegSetThreadName((const char *)&ch_debug);
|
||||||
|
#endif
|
||||||
|
|
||||||
#if CH_CFG_NO_IDLE_THREAD == FALSE
|
#if CH_CFG_NO_IDLE_THREAD == FALSE
|
||||||
{
|
{
|
||||||
|
|
|
@ -77,6 +77,7 @@
|
||||||
- NEW: Added an initialization function to the lwIP bindings, now it is
|
- NEW: Added an initialization function to the lwIP bindings, now it is
|
||||||
sufficient to call lwipInit(NULL); in order to start the subsystem.
|
sufficient to call lwipInit(NULL); in order to start the subsystem.
|
||||||
Demo updated.
|
Demo updated.
|
||||||
|
- RT: Fixed compilation error in RT when registry is disabled (bug #614).
|
||||||
- NIL: Fixed nilrtos redefinition of systime_t (bug #611).
|
- NIL: Fixed nilrtos redefinition of systime_t (bug #611).
|
||||||
- HAL: Fixed TIM2 wrongly classified as 32bits in STM32F1xx devices
|
- HAL: Fixed TIM2 wrongly classified as 32bits in STM32F1xx devices
|
||||||
(bug #610).
|
(bug #610).
|
||||||
|
|
Loading…
Reference in New Issue