summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/watchdogremove.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/score/src/watchdogremove.c')
-rw-r--r--cpukit/score/src/watchdogremove.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/cpukit/score/src/watchdogremove.c b/cpukit/score/src/watchdogremove.c
index 03c0c5f0fe..2aa72a4e75 100644
--- a/cpukit/score/src/watchdogremove.c
+++ b/cpukit/score/src/watchdogremove.c
@@ -61,7 +61,16 @@ static void _Watchdog_Remove_it(
}
if ( iterator->current == &the_watchdog->Node ) {
- iterator->current = _Chain_Previous( &the_watchdog->Node );
+ Chain_Node *previous = _Chain_Previous( &the_watchdog->Node );
+
+ iterator->current = previous;
+
+ if ( previous != _Chain_Head( &header->Watchdogs ) ) {
+ Watchdog_Control *previous_watchdog;
+
+ previous_watchdog = (Watchdog_Control *) previous;
+ iterator->delta_interval += previous_watchdog->delta_interval;
+ }
}
iterator_node = _Chain_Next( iterator_node );