summaryrefslogtreecommitdiffstats
path: root/testsuites/sptests/spintrcritical09
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-02-18 08:36:26 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-03-04 13:36:10 +0100
commit03b900d3ed120ea919ea3eded7edbece3488cff3 (patch)
tree182781fc14fe15fd67caeb80e46f1c58495839c2 /testsuites/sptests/spintrcritical09
parentscore: Distribute clock tick to all online CPUs (diff)
downloadrtems-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/spintrcritical09')
-rw-r--r--testsuites/sptests/spintrcritical09/init.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/testsuites/sptests/spintrcritical09/init.c b/testsuites/sptests/spintrcritical09/init.c
index cc119e88c1..44eccc7821 100644
--- a/testsuites/sptests/spintrcritical09/init.c
+++ b/testsuites/sptests/spintrcritical09/init.c
@@ -15,6 +15,7 @@
#include <intrcritical.h>
#include <rtems/score/threadimpl.h>
+#include <rtems/score/threadimpl.h>
#include <rtems/score/watchdogimpl.h>
const char rtems_test_name[] = "SPINTRCRITICAL 9";
@@ -37,23 +38,21 @@ static rtems_timer_service_routine test_release_from_isr(
void *arg
)
{
- Watchdog_Header *header = &_Watchdog_Ticks_header;
-
- if ( !_Watchdog_Is_empty( header ) ) {
- Watchdog_Control *watchdog = _Watchdog_First( header );
+ Per_CPU_Control *cpu_self = _Per_CPU_Get();
+ Watchdog_Header *header = &cpu_self->Watchdog.Header[ PER_CPU_WATCHDOG_RELATIVE ];
+ Watchdog_Control *watchdog = (Watchdog_Control *) header->first;
- if (
- watchdog->delta_interval == 0
- && watchdog->routine == _Thread_Timeout
- ) {
- Watchdog_States state = _Watchdog_Remove_ticks( watchdog );
+ if (
+ watchdog != NULL
+ && watchdog->expire == cpu_self->Watchdog.ticks
+ && watchdog->routine == _Thread_Timeout
+ ) {
+ _Watchdog_Per_CPU_remove( watchdog, cpu_self, header );
- rtems_test_assert( state == WATCHDOG_ACTIVE );
- (*watchdog->routine)( watchdog->id, watchdog->user_data );
+ (*watchdog->routine)( watchdog );
- if ( is_interrupt_timeout() ) {
- case_hit = true;
- }
+ if ( is_interrupt_timeout() ) {
+ case_hit = true;
}
}
}