diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2014-05-13 12:45:35 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2014-05-13 12:45:35 +0000 |
commit | a0cfa6d0544b7c58f4831e8531cc66ed623574af (patch) | |
tree | a2c593d544a59e646f6ade76946f7420c7dd38c4 /os | |
parent | 03600266786b8b0b6fc000d65350766e2f7d1f25 (diff) | |
download | ChibiOS-a0cfa6d0544b7c58f4831e8531cc66ed623574af.tar.gz ChibiOS-a0cfa6d0544b7c58f4831e8531cc66ed623574af.tar.bz2 ChibiOS-a0cfa6d0544b7c58f4831e8531cc66ed623574af.zip |
Tentative fix for bug #502.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@6933 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r-- | os/nil/include/nil.h | 4 | ||||
-rw-r--r-- | os/nil/src/nil.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/os/nil/include/nil.h b/os/nil/include/nil.h index 161c79a6d..6c3084153 100644 --- a/os/nil/include/nil.h +++ b/os/nil/include/nil.h @@ -735,7 +735,7 @@ typedef struct { * @xclass
*/
#define chVTTimeElapsedSinceX(start) \
- ((systime_t)(chVTGetSystemTimeX() - start))
+ ((systime_t)(chVTGetSystemTimeX() - (start)))
/**
* @brief Checks if the specified time is within the specified time window.
@@ -752,7 +752,7 @@ typedef struct { * @xclass
*/
#define chVTIsTimeWithinX(time, start, end) \
- ((bool)((time) - (start) < (end) - (start)))
+ ((bool)((systime_t)((time) - (start)) < (systime_t)((end) - (start))))
/**
* @brief Condition assertion.
diff --git a/os/nil/src/nil.c b/os/nil/src/nil.c index 789256127..d7afe3b87 100644 --- a/os/nil/src/nil.c +++ b/os/nil/src/nil.c @@ -197,7 +197,7 @@ void chSysTimerHandlerI(void) { chSchReadyI(tp, MSG_TIMEOUT);
}
else {
- if (tp->timeout <= next - 1)
+ if (tp->timeout <= (systime_t)(next - 1))
next = tp->timeout;
}
}
|