From 2462d4b270b1f1bfa2028196dcda6fbe9db03f05 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Mon, 13 Apr 2015 12:10:23 +0000 Subject: Fixed bug 577. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7888 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/rt/src/chvt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'os/rt/src') diff --git a/os/rt/src/chvt.c b/os/rt/src/chvt.c index 7f4ab6a89..214e8a7b6 100644 --- a/os/rt/src/chvt.c +++ b/os/rt/src/chvt.c @@ -204,9 +204,9 @@ void chVTDoResetI(virtual_timer_t *vtp) { vtp->vt_next->vt_prev = vtp->vt_prev; vtp->vt_func = NULL; - /* The above code can change the value in the header when the removed - element is the last of the list, restoring it.*/ - ch.vtlist.vt_delta = (systime_t)-1; + /* Adding delta to the next element, if it is not the last one.*/ + if (&ch.vtlist != (virtual_timers_list_t *)vtp->vt_next) + vtp->vt_next->vt_delta += vtp->vt_delta; return; } -- cgit v1.2.3