From e09208306bbc7c1c1ff533a95f6e126f8e56c030 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sat, 7 Mar 2015 12:54:10 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7729 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/rt/include/chvt.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'os') diff --git a/os/rt/include/chvt.h b/os/rt/include/chvt.h index fe55fcc19..71a8c6bbf 100644 --- a/os/rt/include/chvt.h +++ b/os/rt/include/chvt.h @@ -453,9 +453,11 @@ static inline void chVTDoTickI(void) { virtual_timer_t *vtp; --ch.vtlist.vt_next->vt_delta; - vtp = ch.vtlist.vt_next; - while (vtp->vt_delta == 0U) { - vtfunc_t fn = vtp->vt_func; + while (ch.vtlist.vt_next->vt_delta == 0U) { + vtfunc_t fn; + + vtp = ch.vtlist.vt_next; + fn = vtp->vt_func; vtp->vt_func = NULL; /*lint -save -e9087 -e740 [11.3, 1.3] Cast required by list handling.*/ vtp->vt_next->vt_prev = (virtual_timer_t *)&ch.vtlist; -- cgit v1.2.3