git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9008 35acf78f-673a-0410-8e92-d51de3d6d3f4

master
Giovanni Di Sirio 2016-03-04 11:10:13 +00:00
parent c1783a234b
commit b02624bbb0
2 changed files with 6 additions and 0 deletions

View File

@ -181,8 +181,10 @@ extern "C" {
thread_t *chThdCreateStatic(void *wsp, size_t size,
tprio_t prio, tfunc_t pf, void *arg);
thread_t *chThdStart(thread_t *tp);
#if CH_CFG_USE_REGISTRY == TRUE
thread_t *chThdAddRef(thread_t *tp);
void chThdRelease(thread_t *tp);
#endif
void chThdExit(msg_t msg);
void chThdExitS(msg_t msg);
#if CH_CFG_USE_WAITEXIT == TRUE

View File

@ -107,6 +107,8 @@ thread_t *_thread_init(thread_t *tp, const char *name, tprio_t prio) {
tp->refs = (trefs_t)1;
tp->name = name;
REG_INSERT(tp);
#else
(void)name;
#endif
#if CH_CFG_USE_WAITEXIT == TRUE
list_init(&tp->waiting);
@ -364,6 +366,7 @@ thread_t *chThdStart(thread_t *tp) {
return tp;
}
#if (CH_CFG_USE_REGISTRY == TRUE) || defined(__DOXYGEN__)
/**
* @brief Adds a reference to a thread object.
* @pre The configuration option @p CH_CFG_USE_DYNAMIC must be enabled in
@ -435,6 +438,7 @@ void chThdRelease(thread_t *tp) {
}
chSysUnlock();
}
#endif /* CH_CFG_USE_REGISTRY == TRUE */
/**
* @brief Terminates the current thread.