Fixed bug 3019158.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2028 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
gdisirio 2010-06-21 17:05:53 +00:00
parent fe292af06d
commit d0d72baa87
2 changed files with 10 additions and 2 deletions

View File

@ -154,7 +154,8 @@ msg_t chIQGetTimeout(InputQueue *iqp, systime_t time) {
*
* @param[in] iqp pointer to an @p InputQueue structure
* @param[out] bp pointer to the data buffer
* @param[in] n the maximum amount of data to be transferred
* @param[in] n the maximum amount of data to be transferred, the
* value 0 is reserved
* @param[in] time the number of ticks before the operation timeouts,
* the following special values are allowed:
* - @a TIME_IMMEDIATE immediate timeout.
@ -167,6 +168,8 @@ size_t chIQReadTimeout(InputQueue *iqp, uint8_t *bp,
qnotify_t nfy = iqp->q_notify;
size_t r = 0;
chDbgCheck(n > 0, "chIQReadTimeout");
chSysLock();
while (TRUE) {
if (chIQIsEmpty(iqp)) {
@ -304,7 +307,8 @@ msg_t chOQGetI(OutputQueue *oqp) {
*
* @param[in] oqp pointer to an @p OutputQueue structure
* @param[out] bp pointer to the data buffer
* @param[in] n the maximum amount of data to be transferred
* @param[in] n the maximum amount of data to be transferred, the
* value 0 is reserved
* @param[in] time the number of ticks before the operation timeouts,
* the following special values are allowed:
* - @a TIME_IMMEDIATE immediate timeout.
@ -317,6 +321,8 @@ size_t chOQWriteTimeout(OutputQueue *oqp, const uint8_t *bp,
qnotify_t nfy = oqp->q_notify;
size_t w = 0;
chDbgCheck(n > 0, "chOQWriteTimeout");
chSysLock();
while (TRUE) {
if (chOQIsFull(oqp)) {

View File

@ -59,6 +59,8 @@
*****************************************************************************
*** 2.1.0 ***
- FIX: Fixed missing check in chIQReadTimeout() and chIQWriteTimeout() (bug
3019158)(backported in 2.0.1).
- FIX: Fixed instability in Mutexes subsystem (bug 3019099)(backported
in 2.0.1).
- FIX: Fixed broken AVR port (bug 3016619)(backported in 2.0.0).