aboutsummaryrefslogtreecommitdiffstats
path: root/src/chthreads.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-03-11 14:24:02 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-03-11 14:24:02 +0000
commit89788b3234417d8aea3d5e34d78bf24c4e1da444 (patch)
tree1704eebea5af24a960d920e514eb151ee4cfeeb2 /src/chthreads.c
parent80a8621ec04e3fa9588ad09cbf0f1b6da1429776 (diff)
downloadChibiOS-89788b3234417d8aea3d5e34d78bf24c4e1da444.tar.gz
ChibiOS-89788b3234417d8aea3d5e34d78bf24c4e1da444.tar.bz2
ChibiOS-89788b3234417d8aea3d5e34d78bf24c4e1da444.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@831 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'src/chthreads.c')
-rw-r--r--src/chthreads.c35
1 files changed, 16 insertions, 19 deletions
diff --git a/src/chthreads.c b/src/chthreads.c
index 70db14130..5a7a98943 100644
--- a/src/chthreads.c
+++ b/src/chthreads.c
@@ -73,10 +73,8 @@ static void memfill(uint8_t *startp, uint8_t *endp, uint8_t v) {
*
* @param[out] workspace pointer to a working area dedicated to the thread
* stack
- * @param[in] wsize size of the working area.
- * @param[in] prio the priority level for the new thread. Usually the threads
- * are created with priority @p NORMALPRIO, priorities
- * can range from @p LOWPRIO to @p HIGHPRIO.
+ * @param[in] wsize size of the working area
+ * @param[in] prio the priority level for the new thread
* @param[in] pf the thread function
* @param[in] arg an argument passed to the thread function. It can be @p NULL.
* @return The pointer to the @p Thread structure allocated for the
@@ -112,10 +110,8 @@ Thread *chThdInit(void *workspace, size_t wsize,
*
* @param[out] workspace pointer to a working area dedicated to the thread
* stack
- * @param[in] wsize size of the working area.
- * @param[in] prio the priority level for the new thread. Usually the threads
- * are created with priority @p NORMALPRIO, priorities
- * can range from @p LOWPRIO to @p HIGHPRIO.
+ * @param[in] wsize size of the working area
+ * @param[in] prio the priority level for the new thread
* @param[in] pf the thread function
* @param[in] arg an argument passed to the thread function. It can be @p NULL.
* @return The pointer to the @p Thread structure allocated for the
@@ -134,9 +130,7 @@ Thread *chThdCreateStatic(void *workspace, size_t wsize,
* @brief Creates a new thread allocating the memory from the heap.
*
* @param[in] wsize size of the working area to be allocated
- * @param[in] prio the priority level for the new thread. Usually the threads
- * are created with priority @p NORMALPRIO, priorities
- * can range from @p LOWPRIO to @p HIGHPRIO.
+ * @param[in] prio the priority level for the new thread
* @param[in] pf the thread function
* @param[in] arg an argument passed to the thread function. It can be @p NULL.
* @return The pointer to the @p Thread structure allocated for the
@@ -168,9 +162,7 @@ Thread *chThdCreateFromHeap(size_t wsize, tprio_t prio,
* Pool.
*
* @param[in] mp the memory pool
- * @param[in] prio the priority level for the new thread. Usually the threads
- * are created with priority @p NORMALPRIO, priorities
- * can range from @p LOWPRIO to @p HIGHPRIO.
+ * @param[in] prio the priority level for the new thread
* @param[in] pf the thread function
* @param[in] arg an argument passed to the thread function. It can be @p NULL.
* @return The pointer to the @p Thread structure allocated for the
@@ -207,7 +199,7 @@ Thread *chThdCreateFromMemoryPool(MemoryPool *mp, tprio_t prio,
* @param[in] newprio the new priority level of the running thread
* @return The old priority level.
* @note The function returns the real thread priority regardless of the
- * actual priority that could be higher than the real priority because
+ * current priority that could be higher than the real priority because
* the priority inheritance mechanism.
*/
tprio_t chThdSetPriority(tprio_t newprio) {
@@ -268,13 +260,18 @@ void chThdTerminate(Thread *tp) {
/**
* @brief Suspends the invoking thread for the specified time.
*
- * @param[in] time the delay in system ticks, the values @p TIME_IMMEDIATE and
- * @p TIME_INFINITE are not allowed
+ * @param[in] time the delay in system ticks, the special values are handled as
+ * follow:
+ * - @a TIME_INFINITE the thread enters an infinite sleep
+ * state.
+ * - @a TIME_IMMEDIATE this value is accepted but interpreted
+ * as a normal time specification not as an immediate timeout
+ * specification.
+ * .
*/
void chThdSleep(systime_t time) {
- chDbgCheck((time != TIME_IMMEDIATE) && (time != TIME_INFINITE),
- "chThdSleep");
+ chDbgCheck(time != TIME_INFINITE, "chThdSleep");
chSysLock();
chThdSleepS(time);