diff options
author | Thomas Doerfler <Thomas.Doerfler@embedded-brains.de> | 2009-11-30 09:08:35 +0000 |
---|---|---|
committer | Thomas Doerfler <Thomas.Doerfler@embedded-brains.de> | 2009-11-30 09:08:35 +0000 |
commit | 6e51c4c9f7212bd696ee7aa777c9ca4ac1ad6d3b (patch) | |
tree | 0260716bb7c1fc8b80e018924678a0b74a7b42bf /testsuites/sptests/sp31/task1.c | |
parent | Regenerate. (diff) | |
download | rtems-6e51c4c9f7212bd696ee7aa777c9ca4ac1ad6d3b.tar.bz2 |
Added timer server control block
Removed _Timer_Server thread pointer
Added _Timer_server pointer to the default timer server control block
Rework of the timer server implementation.
Diffstat (limited to 'testsuites/sptests/sp31/task1.c')
-rw-r--r-- | testsuites/sptests/sp31/task1.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/testsuites/sptests/sp31/task1.c b/testsuites/sptests/sp31/task1.c index 03021d3ce0..13385aa319 100644 --- a/testsuites/sptests/sp31/task1.c +++ b/testsuites/sptests/sp31/task1.c @@ -35,6 +35,14 @@ rtems_timer_service_routine Should_not_fire_TSR( TSR_fired = 1; } +static Watchdog_Interval schedule_time( void ) +{ + const Watchdog_Control *watchdog = + &_Timer_server->Interval_watchdogs.System_watchdog; + + return watchdog->initial + watchdog->start_time; +} + rtems_task Task_1( rtems_task_argument argument ) @@ -105,7 +113,7 @@ rtems_task Task_1( printf( "Timer 1 scheduled for %" PRIdWatchdog_Interval " ticks since boot\n", info.start_time + info.initial ); printf( "Timer Server scheduled for %" PRIdWatchdog_Interval " ticks since boot\n", - _Timer_Server->Timer.initial + _Timer_Server->Timer.start_time ); + schedule_time() ); puts( "TA1 - rtems_task_wake_after - 1 second" ); status = rtems_task_wake_after( 1 * rtems_clock_get_ticks_per_second() ); @@ -121,9 +129,8 @@ rtems_task Task_1( printf( "Timer 1 scheduled for %" PRIdWatchdog_Interval " ticks since boot\n", info.start_time + info.initial ); printf( "Timer Server scheduled for %" PRIdWatchdog_Interval " ticks since boot\n", - _Timer_Server->Timer.initial + _Timer_Server->Timer.start_time ); - assert( (info.start_time + info.initial) == - (_Timer_Server->Timer.initial + _Timer_Server->Timer.start_time) ); + schedule_time() ); + assert( (info.start_time + info.initial) == schedule_time() ); puts( "TA1 - rtems_task_wake_after - 1 second" ); status = rtems_task_wake_after( 1 * rtems_clock_get_ticks_per_second() ); @@ -139,9 +146,8 @@ rtems_task Task_1( printf( "Timer 1 scheduled for %" PRIdWatchdog_Interval " ticks since boot\n", info.start_time + info.initial ); printf( "Timer Server scheduled for %" PRIdWatchdog_Interval " ticks since boot\n", - _Timer_Server->Timer.initial + _Timer_Server->Timer.start_time ); - assert( (info.start_time + info.initial) == - (_Timer_Server->Timer.initial + _Timer_Server->Timer.start_time) ); + schedule_time() ); + assert( (info.start_time + info.initial) == schedule_time() ); puts( "TA1 - rtems_timer_cancel - timer 1" ); status = rtems_timer_cancel( tmid ); |