aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-02-02 21:33:14 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-02-02 21:33:14 +0000
commit7e9725de2ff3c472785320c5f5cff1103e5284c5 (patch)
treeeb9ce0f6d9c44c9c7ff5693d21df551cb7c32ba2 /os
parentca20fd81f6f5cba290763cf08243f582841cf770 (diff)
downloadChibiOS-7e9725de2ff3c472785320c5f5cff1103e5284c5.tar.gz
ChibiOS-7e9725de2ff3c472785320c5f5cff1103e5284c5.tar.bz2
ChibiOS-7e9725de2ff3c472785320c5f5cff1103e5284c5.zip
Improved descriptions.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1561 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r--os/kernel/include/threads.h2
-rw-r--r--os/kernel/src/chthreads.c15
2 files changed, 8 insertions, 9 deletions
diff --git a/os/kernel/include/threads.h b/os/kernel/include/threads.h
index 24b79a3cd..8a3756cb8 100644
--- a/os/kernel/include/threads.h
+++ b/os/kernel/include/threads.h
@@ -176,7 +176,7 @@ extern "C" {
void chThdExit(msg_t msg);
#if CH_USE_DYNAMIC
Thread *chThdAddRef(Thread *tp);
- Thread *chThdRelease(Thread *tp);
+ void chThdRelease(Thread *tp);
#endif
#if CH_USE_WAITEXIT
msg_t chThdWait(Thread *tp);
diff --git a/os/kernel/src/chthreads.c b/os/kernel/src/chthreads.c
index 95b1e68bf..fc697d1e9 100644
--- a/os/kernel/src/chthreads.c
+++ b/os/kernel/src/chthreads.c
@@ -345,7 +345,8 @@ void chThdExit(msg_t msg) {
* @brief Adds a reference to a thread object.
*
* @param[in] tp pointer to the thread
- * @return The same thread pointer passed as parameter.
+ * @return The same thread pointer passed as parameter representing the
+ * new reference.
*/
Thread *chThdAddRef(Thread *tp) {
@@ -357,15 +358,14 @@ Thread *chThdAddRef(Thread *tp) {
}
/**
* @brief Releases a reference to a thread object.
- * @details If the references counter reaches zero and the thread is in
- * @p THD_STATE_FINAL state then the thread's memory is returned
- * to the proper allocator.
+ * @details If the references counter reaches zero <b>and</b> the thread
+ * is in the @p THD_STATE_FINAL state then the thread's memory is
+ * returned to the proper allocator.
* @note Static threads are not affected.
*
* @param[in] tp pointer to the thread
- * @return The same thread pointer passed as parameter.
*/
-Thread *chThdRelease(Thread *tp) {
+void chThdRelease(Thread *tp) {
trefs_t refs;
chSysLock();
@@ -389,7 +389,6 @@ Thread *chThdRelease(Thread *tp) {
#endif
}
}
- return tp;
}
#endif /* CH_USE_DYNAMIC */
@@ -397,7 +396,7 @@ Thread *chThdRelease(Thread *tp) {
/**
* @brief Blocks the execution of the invoking thread until the specified
* thread terminates then the exit code is returned.
- * @details This function waits that the specified thread terminates then
+ * @details This function waits for the specified thread to terminate then
* decrements its reference counter, if the counter reaches zero then
* the thread working area is returned to the proper allocator.<br>
* The memory used by the exited thread is handled in different ways