From 7e7c7d4cea1abf1c0e606b4507cbdb81f968a39e Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sun, 16 Jun 2019 12:23:00 +0000 Subject: More bug #1031. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/stable_19.1.x@12839 27425a3e-05d8-49a3-a47f-9c15f0e5edd8 --- os/rt/include/chvt.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/os/rt/include/chvt.h b/os/rt/include/chvt.h index f1bb4d9f2..ca3b8bf44 100644 --- a/os/rt/include/chvt.h +++ b/os/rt/include/chvt.h @@ -218,10 +218,8 @@ static inline bool chVTGetTimersStateI(sysinterval_t *timep) { #if CH_CFG_ST_TIMEDELTA == 0 *timep = ch.vtlist.next->delta; #else - *timep = chTimeDiffX(chVTGetSystemTimeX(), - chTimeAddX(ch.vtlist.lasttime, - ch.vtlist.next->delta + - (sysinterval_t)CH_CFG_ST_TIMEDELTA)); + *timep = (ch.vtlist.next->delta + (sysinterval_t)CH_CFG_ST_TIMEDELTA) - + chTimeDiffX(ch.vtlist.lasttime, chVTGetSystemTimeX()); #endif } @@ -423,7 +421,7 @@ static inline void chVTDoTickI(void) { fn = vtp->func; vtp->func = NULL; - /* if the list becomes empty then the timer is stopped.*/ + /* If the list becomes empty then the timer is stopped.*/ if (ch.vtlist.next == (virtual_timer_t *)&ch.vtlist) { port_timer_stop_alarm(); } @@ -439,7 +437,7 @@ static inline void chVTDoTickI(void) { while (vtp->delta <= nowdelta); } - /* if the list is empty, nothing else to do.*/ + /* If the list is empty, nothing else to do.*/ if (ch.vtlist.next == (virtual_timer_t *)&ch.vtlist) { return; } -- cgit v1.2.3