diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-02-18 08:36:26 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-03-04 13:36:10 +0100 |
commit | 03b900d3ed120ea919ea3eded7edbece3488cff3 (patch) | |
tree | 182781fc14fe15fd67caeb80e46f1c58495839c2 /testsuites/sptests/spintrcritical08 | |
parent | score: Distribute clock tick to all online CPUs (diff) | |
download | rtems-03b900d3ed120ea919ea3eded7edbece3488cff3.tar.bz2 |
score: Replace watchdog handler implementation
Use a red-black tree instead of delta chains.
Close #2344.
Update #2554.
Update #2555.
Close #2606.
Diffstat (limited to 'testsuites/sptests/spintrcritical08')
-rw-r--r-- | testsuites/sptests/spintrcritical08/init.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/testsuites/sptests/spintrcritical08/init.c b/testsuites/sptests/spintrcritical08/init.c index f375cd49f3..3610e65b96 100644 --- a/testsuites/sptests/spintrcritical08/init.c +++ b/testsuites/sptests/spintrcritical08/init.c @@ -46,23 +46,21 @@ static rtems_timer_service_routine test_release_from_isr( void *arg ) { - Watchdog_Header *header = &_Watchdog_Ticks_header; + Per_CPU_Control *cpu = _Per_CPU_Get(); + Watchdog_Header *header = &cpu->Watchdog.Header[ PER_CPU_WATCHDOG_RELATIVE ]; + Watchdog_Control *watchdog = (Watchdog_Control *) header->first; - if ( !_Watchdog_Is_empty( header ) ) { - Watchdog_Control *watchdog = _Watchdog_First( header ); + if ( + watchdog != NULL + && watchdog->expire == cpu->Watchdog.ticks + && watchdog->routine == _Rate_monotonic_Timeout + ) { + _Watchdog_Per_CPU_remove_relative( watchdog ); - if ( - watchdog->delta_interval == 0 - && watchdog->routine == _Rate_monotonic_Timeout - ) { - Watchdog_States state = _Watchdog_Remove_ticks( watchdog ); + (*watchdog->routine)( watchdog ); - rtems_test_assert( state == WATCHDOG_ACTIVE ); - (*watchdog->routine)( watchdog->id, watchdog->user_data ); - - if ( getState() == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING ) { - case_hit = true; - } + if ( getState() == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING ) { + case_hit = true; } } } |