diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-03-10 22:05:31 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-03-10 22:05:31 +0000 |
commit | 7dbc6a75678e6e06ec99786eb945d043b64e9721 (patch) | |
tree | 7da13c151526d44c447df2a6c0fe7f53be2846a5 | |
parent | da4f9beaee8f1f8f344012b4d9a122462a6c802e (diff) | |
download | ChibiOS-7dbc6a75678e6e06ec99786eb945d043b64e9721.tar.gz ChibiOS-7dbc6a75678e6e06ec99786eb945d043b64e9721.tar.bz2 ChibiOS-7dbc6a75678e6e06ec99786eb945d043b64e9721.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@829 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r-- | readme.txt | 2 | ||||
-rw-r--r-- | src/chvt.c | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/readme.txt b/readme.txt index 5c3163a41..7607cc93d 100644 --- a/readme.txt +++ b/readme.txt @@ -75,6 +75,8 @@ Win32-MinGW - ChibiOS/RT simulator and demo into a WIN32 process, *** 1.1.2unstable ***
- FIX: Fixed priority inheritance problem with condvars (bug 2674756) and
added a specific test case to the test suite (backported in stable branch).
+- FIX: Fixed a problem in time ranges (bug 2680425)(backported in stable
+ branch).
- FIX: Fixed a wrong parameter check in chVTSetI() (bug 2679155).
- FIX: Build error with options CH_USE_NESTED_LOCKS && !CH_OPTIMIZE_SPEED
(bug 2678928).
diff --git a/src/chvt.c b/src/chvt.c index 9d4fec138..ce322e35f 100644 --- a/src/chvt.c +++ b/src/chvt.c @@ -102,12 +102,14 @@ void chVTResetI(VirtualTimer *vtp) { * @param[in] end the end of the time window (non inclusive)
* @retval TRUE current time within the specified time window.
* @retval FALSE current time not within the specified time window.
+ * @note When start==end then the function returns always true because the
+ * whole time range is specified.
*/
bool_t chTimeIsWithin(systime_t start, systime_t end) {
systime_t time = chTimeNow();
- return end >= start ? (time >= start) && (time < end) :
- (time >= start) || (time < end);
+ return end > start ? (time >= start) && (time < end) :
+ (time >= start) || (time < end);
}
/** @} */
|