aboutsummaryrefslogtreecommitdiffstats
path: root/os/rt
diff options
context:
space:
mode:
Diffstat (limited to 'os/rt')
-rw-r--r--os/rt/include/chthreads.h2
-rw-r--r--os/rt/src/chthreads.c4
2 files changed, 6 insertions, 0 deletions
diff --git a/os/rt/include/chthreads.h b/os/rt/include/chthreads.h
index 2832051e9..6ddfef997 100644
--- a/os/rt/include/chthreads.h
+++ b/os/rt/include/chthreads.h
@@ -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
diff --git a/os/rt/src/chthreads.c b/os/rt/src/chthreads.c
index 943ca7d7c..04b8fab4c 100644
--- a/os/rt/src/chthreads.c
+++ b/os/rt/src/chthreads.c
@@ -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.