From 59c68d240c0e1bb0837f21f43f9aa2b9ad389525 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Mon, 20 Dec 2010 14:12:47 +0100 Subject: [PATCH] Don't forget to shift last class dispatch timevals on step --- sched.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sched.c b/sched.c index 9324e01..39fa7d0 100644 --- a/sched.c +++ b/sched.c @@ -496,7 +496,7 @@ handle_slew(struct timeval *raw, void *anything) { TimerQueueEntry *ptr; - struct timeval T1; + int i; if (is_step_change) { /* We're not interested in anything else - it won't affect the @@ -504,10 +504,12 @@ handle_slew(struct timeval *raw, occurs, just shift all the timeouts by the offset */ for (ptr = timer_queue.next; ptr != &timer_queue; ptr = ptr->next) { - UTI_AddDoubleToTimeval(&ptr->tv, -doffset, &T1); - ptr->tv = T1; + UTI_AddDoubleToTimeval(&ptr->tv, -doffset, &ptr->tv); } + for (i = 0; i < SCH_NumberOfClasses; i++) { + UTI_AddDoubleToTimeval(&last_class_dispatch[i], -doffset, &last_class_dispatch[i]); + } } }