diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-02-21 19:06:46 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-02-21 19:06:46 +0000 |
commit | b3b1028036a2f18327fb97f2126192a2ace62bb2 (patch) | |
tree | 4266ff20b2a8b76a331572557a19e64b48f56738 /os/kernel/src/chcond.c | |
parent | 17f0815d52977bd1e3e9e662d2ffdccbaf77a6bd (diff) | |
download | ChibiOS-b3b1028036a2f18327fb97f2126192a2ace62bb2.tar.gz ChibiOS-b3b1028036a2f18327fb97f2126192a2ace62bb2.tar.bz2 ChibiOS-b3b1028036a2f18327fb97f2126192a2ace62bb2.zip |
TIME_IMMEDIATE and TIME_INFINITE values swapped.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2757 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/kernel/src/chcond.c')
-rw-r--r-- | os/kernel/src/chcond.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/os/kernel/src/chcond.c b/os/kernel/src/chcond.c index 0ad9d459d..a6534eabc 100644 --- a/os/kernel/src/chcond.c +++ b/os/kernel/src/chcond.c @@ -203,11 +203,11 @@ msg_t chCondWaitS(CondVar *cp) { * mutex, the mutex ownership is lost.
*
* @param[in] cp pointer to the @p CondVar structure
- * @param[in] time the number of ticks before the operation timeouts,
- * the special value @p TIME_INFINITE is allowed.
- * It is not possible to specify zero @p TIME_IMMEDIATE
- * as timeout specification because it would make no sense
- * in this function.
+ * @param[in] time the number of ticks before the operation timeouts, the
+ * special values are handled as follow:
+ * - @a TIME_INFINITE no timeout.
+ * - @a TIME_IMMEDIATE this value is not allowed.
+ * .
* @return A message specifying how the invoking thread has been
* released from the condition variable.
* @retval RDY_OK if the condvar has been signaled using
@@ -240,11 +240,11 @@ msg_t chCondWaitTimeout(CondVar *cp, systime_t time) { * mutex, the mutex ownership is lost.
*
* @param[in] cp pointer to the @p CondVar structure
- * @param[in] time the number of ticks before the operation timeouts,
- * the special value @p TIME_INFINITE is allowed.
- * It is not possible to specify zero @p TIME_IMMEDIATE
- * as timeout specification because it would make no sense
- * in this function.
+ * @param[in] time the number of ticks before the operation timeouts, the
+ * special values are handled as follow:
+ * - @a TIME_INFINITE no timeout.
+ * - @a TIME_IMMEDIATE this value is not allowed.
+ * .
* @return A message specifying how the invoking thread has been
* released from the condition variable.
* @retval RDY_OK if the condvar has been signaled using
@@ -260,7 +260,7 @@ msg_t chCondWaitTimeoutS(CondVar *cp, systime_t time) { Mutex *mp;
msg_t msg;
- chDbgCheck(cp != NULL, "chCondWaitTimeoutS");
+ chDbgCheck((cp != NULL) && (time != TIME_IMMEDIATE), "chCondWaitTimeoutS");
chDbgAssert(currp->p_mtxlist != NULL,
"chCondWaitTimeoutS(), #1",
"not owning a mutex");
|