From 5e7b6272fc10068c22bfedb18a26a23a37e9a7ff Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 31 May 1996 23:27:45 +0000 Subject: renamed _TOD_Ticks_since_boot as _Watchdog_Ticks_since_boot so the Watchdog Handler could timestamp the starting and stopping of timers. Since TOD is built on top of Watchdog, this avoided a circular dependency. --- cpukit/score/src/coretod.c | 1 - cpukit/score/src/watchdog.c | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'cpukit/score/src') diff --git a/cpukit/score/src/coretod.c b/cpukit/score/src/coretod.c index 1a11034ceb..8c7fb93d79 100644 --- a/cpukit/score/src/coretod.c +++ b/cpukit/score/src/coretod.c @@ -37,7 +37,6 @@ void _TOD_Handler_initialization( { _TOD_Microseconds_per_tick = microseconds_per_tick; - _TOD_Ticks_since_boot = 0; _TOD_Seconds_since_epoch = 0; _TOD_Current.year = TOD_BASE_YEAR; diff --git a/cpukit/score/src/watchdog.c b/cpukit/score/src/watchdog.c index 0f72bd3d5c..2ada0ff71e 100644 --- a/cpukit/score/src/watchdog.c +++ b/cpukit/score/src/watchdog.c @@ -32,6 +32,8 @@ void _Watchdog_Handler_initialization( void ) { _Watchdog_Sync_count = 0; _Watchdog_Sync_level = 0; + _Watchdog_Ticks_since_boot = 0; + _Chain_Initialize_empty( &_Watchdog_Ticks_chain ); _Chain_Initialize_empty( &_Watchdog_Seconds_chain ); } @@ -82,6 +84,8 @@ Watchdog_States _Watchdog_Remove( _Chain_Extract_unprotected( &the_watchdog->Node ); break; } + the_watchdog->stop_time = _Watchdog_Ticks_since_boot; + _ISR_Enable( level ); return( previous_state ); } @@ -200,6 +204,8 @@ restart: _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); + the_watchdog->start_time = _Watchdog_Ticks_since_boot; + exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; _Watchdog_Sync_count--; -- cgit v1.2.3