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 | |
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')
28 files changed, 844 insertions, 519 deletions
diff --git a/testsuites/psxtests/psx04/init.c b/testsuites/psxtests/psx04/init.c index ff3bb96e13..945da76a17 100644 --- a/testsuites/psxtests/psx04/init.c +++ b/testsuites/psxtests/psx04/init.c @@ -281,7 +281,12 @@ void *POSIX_Init( puts( "Init: Wait 4 seconds for alarm" ); remaining = sleep( 4 ); printf( "Init: %d seconds left in sleep\n", remaining ); - rtems_test_assert( remaining == 2 ); + + /* + * sleep() uses nanosleep() internally which discards the nanoseconds part, + * e.g. 1.99s -> 1s + */ + rtems_test_assert( remaining == 1 || remaining == 2 ); /* test SIG_SETMASK case and returning oset of pthread_sigmask */ diff --git a/testsuites/smptests/Makefile.am b/testsuites/smptests/Makefile.am index 92f45286e5..610f3137c4 100644 --- a/testsuites/smptests/Makefile.am +++ b/testsuites/smptests/Makefile.am @@ -14,6 +14,7 @@ SUBDIRS += smpatomic01 SUBDIRS += smpcache01 SUBDIRS += smpcapture01 SUBDIRS += smpcapture02 +SUBDIRS += smpclock01 SUBDIRS += smpfatal01 SUBDIRS += smpfatal02 SUBDIRS += smpfatal03 diff --git a/testsuites/smptests/configure.ac b/testsuites/smptests/configure.ac index 27e8f9c95a..a89b796afe 100644 --- a/testsuites/smptests/configure.ac +++ b/testsuites/smptests/configure.ac @@ -69,6 +69,7 @@ smpatomic01/Makefile smpcache01/Makefile smpcapture01/Makefile smpcapture02/Makefile +smpclock01/Makefile smpfatal01/Makefile smpfatal02/Makefile smpfatal03/Makefile diff --git a/testsuites/smptests/smpclock01/Makefile.am b/testsuites/smptests/smpclock01/Makefile.am new file mode 100644 index 0000000000..49e274b833 --- /dev/null +++ b/testsuites/smptests/smpclock01/Makefile.am @@ -0,0 +1,20 @@ +rtems_tests_PROGRAMS = smpclock01 +smpclock01_SOURCES = init.c +smpclock01_SOURCES += ../../support/src/spin.c + +dist_rtems_tests_DATA = smpclock01.scn smpclock01.doc + +include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg +include $(top_srcdir)/../automake/compile.am +include $(top_srcdir)/../automake/leaf.am + +AM_CPPFLAGS += -I$(top_srcdir)/../support/include + +LINK_OBJS = $(smpclock01_OBJECTS) +LINK_LIBS = $(smpclock01_LDLIBS) + +smpclock01$(EXEEXT): $(smpclock01_OBJECTS) $(smpclock01_DEPENDENCIES) + @rm -f smpclock01$(EXEEXT) + $(make-exe) + +include $(top_srcdir)/../automake/local.am diff --git a/testsuites/smptests/smpclock01/init.c b/testsuites/smptests/smpclock01/init.c new file mode 100644 index 0000000000..36016ef680 --- /dev/null +++ b/testsuites/smptests/smpclock01/init.c @@ -0,0 +1,206 @@ +/* + * Copyright (c) 2016 embedded brains GmbH. All rights reserved. + * + * embedded brains GmbH + * Dornierstr. 4 + * 82178 Puchheim + * Germany + * <rtems@embedded-brains.de> + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H + #include "config.h" +#endif + +#include "tmacros.h" + +#include <rtems.h> +#include <rtems/libcsupport.h> +#include <rtems/score/percpu.h> +#include <rtems/score/smpbarrier.h> + +#include <test_support.h> + +#define CPU_COUNT 2 + +#define SCHEDULER_A rtems_build_name(' ', ' ', ' ', 'A') + +#define SCHEDULER_B rtems_build_name(' ', ' ', ' ', 'B') + +const char rtems_test_name[] = "SMPCLOCK 1"; + +typedef struct { + SMP_barrier_Control barrier; + SMP_barrier_State delay_barrier_state; + SMP_barrier_State timer_barrier_state; +} test_context; + +static test_context test_instance = { + .barrier = SMP_BARRIER_CONTROL_INITIALIZER, + .delay_barrier_state = SMP_BARRIER_STATE_INITIALIZER, + .timer_barrier_state = SMP_BARRIER_STATE_INITIALIZER +}; + +static void wait(test_context *ctx, SMP_barrier_State *bs) +{ + _SMP_barrier_Wait(&ctx->barrier, bs, CPU_COUNT); +} + +static void timer_isr(rtems_id id, void *arg) +{ + test_context *ctx = arg; + + /* (B) */ + wait(ctx, &ctx->timer_barrier_state); +} + +static void timer_task(rtems_task_argument arg) +{ + test_context *ctx = (test_context *) arg; + rtems_status_code sc; + rtems_id timer_id; + + rtems_test_assert(rtems_get_current_processor() == 1); + + sc = rtems_timer_create(SCHEDULER_B, &timer_id); + rtems_test_assert(sc == RTEMS_SUCCESSFUL); + + /* (A) */ + wait(ctx, &ctx->timer_barrier_state); + + sc = rtems_timer_fire_after(timer_id, 1, timer_isr, ctx); + rtems_test_assert(sc == RTEMS_SUCCESSFUL); + + sc = rtems_task_wake_after(1); + rtems_test_assert(sc == RTEMS_SUCCESSFUL); + + sc = rtems_timer_delete(timer_id); + rtems_test_assert(sc == RTEMS_SUCCESSFUL); + + /* (C) */ + wait(ctx, &ctx->timer_barrier_state); + + while (true) { + /* Wait for deletion */ + } +} + +static void delay_clock_tick(test_context *ctx) +{ + rtems_interrupt_level level; + const Per_CPU_Control *cpu_self = _Per_CPU_Get_by_index(0); + const Per_CPU_Control *cpu_other = _Per_CPU_Get_by_index(1); + uint64_t ticks; + + rtems_test_assert(rtems_get_current_processor() == 0); + + rtems_test_spin_until_next_tick(); + ticks = cpu_self->Watchdog.ticks; + + rtems_interrupt_local_disable(level); + + /* (A) */ + wait(ctx, &ctx->delay_barrier_state); + + /* (B) */ + wait(ctx, &ctx->delay_barrier_state); + + rtems_test_assert(cpu_self->Watchdog.ticks == ticks); + rtems_test_assert(cpu_other->Watchdog.ticks == ticks + 1); + + rtems_interrupt_local_enable(level); + + rtems_test_assert(cpu_self->Watchdog.ticks == ticks + 1); + rtems_test_assert(cpu_other->Watchdog.ticks == ticks + 1); + + /* (C) */ + wait(ctx, &ctx->delay_barrier_state); +} + +static void test(void) +{ + test_context *ctx = &test_instance; + rtems_status_code sc; + rtems_id scheduler_b_id; + rtems_id task_id; + + sc = rtems_scheduler_ident(SCHEDULER_B, &scheduler_b_id); + rtems_test_assert(sc == RTEMS_SUCCESSFUL); + + sc = rtems_task_create( + SCHEDULER_B, + 1, + RTEMS_MINIMUM_STACK_SIZE, + RTEMS_DEFAULT_MODES, + RTEMS_DEFAULT_ATTRIBUTES, + &task_id + ); + rtems_test_assert(sc == RTEMS_SUCCESSFUL); + + sc = rtems_task_set_scheduler(task_id, scheduler_b_id); + rtems_test_assert(sc == RTEMS_SUCCESSFUL); + + sc = rtems_task_start(task_id, timer_task, (rtems_task_argument) ctx); + rtems_test_assert(sc == RTEMS_SUCCESSFUL); + + delay_clock_tick(ctx); + + sc = rtems_task_delete(task_id); + rtems_test_assert(sc == RTEMS_SUCCESSFUL); +} + +static void Init(rtems_task_argument arg) +{ + rtems_resource_snapshot snapshot; + + TEST_BEGIN(); + + rtems_resource_snapshot_take(&snapshot); + + if (rtems_get_processor_count() == CPU_COUNT) { + test(); + } + + rtems_test_assert(rtems_resource_snapshot_check(&snapshot)); + + TEST_END(); + rtems_test_exit(0); +} + +#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER +#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER + +#define CONFIGURE_SMP_APPLICATION + +#define CONFIGURE_SMP_MAXIMUM_PROCESSORS CPU_COUNT + +#define CONFIGURE_SCHEDULER_SIMPLE_SMP + +#include <rtems/scheduler.h> + +RTEMS_SCHEDULER_CONTEXT_SIMPLE_SMP(a); +RTEMS_SCHEDULER_CONTEXT_SIMPLE_SMP(b); + +#define CONFIGURE_SCHEDULER_CONTROLS \ + RTEMS_SCHEDULER_CONTROL_SIMPLE_SMP(a, SCHEDULER_A), \ + RTEMS_SCHEDULER_CONTROL_SIMPLE_SMP(b, SCHEDULER_B) + +#define CONFIGURE_SMP_SCHEDULER_ASSIGNMENTS \ + RTEMS_SCHEDULER_ASSIGN(0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY), \ + RTEMS_SCHEDULER_ASSIGN(1, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL) + +#define CONFIGURE_MAXIMUM_TASKS CPU_COUNT + +#define CONFIGURE_MAXIMUM_TIMERS 1 + +#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION + +#define CONFIGURE_RTEMS_INIT_TASKS_TABLE + +#define CONFIGURE_INIT + +#include <rtems/confdefs.h> diff --git a/testsuites/smptests/smpclock01/smpclock01.doc b/testsuites/smptests/smpclock01/smpclock01.doc new file mode 100644 index 0000000000..130644a60d --- /dev/null +++ b/testsuites/smptests/smpclock01/smpclock01.doc @@ -0,0 +1,11 @@ +This file describes the directives and concepts tested by this test set. + +test set name: smpclock01 + +directives: + + - Clock driver interrupt + +concepts: + + - Ensures that the clock interrupt is distributed to all online processors. diff --git a/testsuites/smptests/smpclock01/smpclock01.scn b/testsuites/smptests/smpclock01/smpclock01.scn new file mode 100644 index 0000000000..192ed83471 --- /dev/null +++ b/testsuites/smptests/smpclock01/smpclock01.scn @@ -0,0 +1,2 @@ +*** BEGIN OF TEST SMPCLOCK 1 *** +*** END OF TEST SMPCLOCK 1 *** diff --git a/testsuites/smptests/smpwakeafter01/smpwakeafter01.scn b/testsuites/smptests/smpwakeafter01/smpwakeafter01.scn index 9bbb558421..7fa203d813 100644 --- a/testsuites/smptests/smpwakeafter01/smpwakeafter01.scn +++ b/testsuites/smptests/smpwakeafter01/smpwakeafter01.scn @@ -9,36 +9,196 @@ 3 seconds remaining 2 seconds remaining 1 seconds remaining -counts[0][0] = 15479 -counts[0][1] = 17039 -counts[0][2] = 12389 -counts[0][3] = 8077 -counts[0][4] = 3 -counts[0][5] = 2431 -counts[0][6] = 2630 -counts[0][7] = 2128 -counts[1][0] = 15461 -counts[1][1] = 16813 -counts[1][2] = 12248 -counts[1][3] = 7483 -counts[1][4] = 5499 -counts[1][5] = 3170 -counts[1][6] = 2549 -counts[1][7] = 1748 -counts[2][0] = 71 -counts[2][1] = 17068 -counts[2][2] = 7661 -counts[2][3] = 8190 -counts[2][4] = 5513 -counts[2][5] = 3864 -counts[2][6] = 1454 -counts[2][7] = 1993 -counts[3][0] = 14511 -counts[3][1] = 16115 -counts[3][2] = 12561 -counts[3][3] = 7281 -counts[3][4] = 5507 -counts[3][5] = 3828 -counts[3][6] = 2687 -counts[3][7] = 1278 +counts[0][0] = 10013 +counts[0][1] = 5007 +counts[0][2] = 3339 +counts[0][3] = 2004 +counts[0][4] = 1432 +counts[0][5] = 912 +counts[0][6] = 771 +counts[0][7] = 590 +counts[1][0] = 10027 +counts[1][1] = 5015 +counts[1][2] = 3344 +counts[1][3] = 2007 +counts[1][4] = 1434 +counts[1][5] = 913 +counts[1][6] = 773 +counts[1][7] = 591 +counts[2][0] = 10041 +counts[2][1] = 5022 +counts[2][2] = 3349 +counts[2][3] = 2010 +counts[2][4] = 1436 +counts[2][5] = 914 +counts[2][6] = 774 +counts[2][7] = 592 +counts[3][0] = 10055 +counts[3][1] = 5029 +counts[3][2] = 3353 +counts[3][3] = 2013 +counts[3][4] = 1438 +counts[3][5] = 915 +counts[3][6] = 775 +counts[3][7] = 593 +counts[4][0] = 10070 +counts[4][1] = 5036 +counts[4][2] = 3358 +counts[4][3] = 2015 +counts[4][4] = 1440 +counts[4][5] = 917 +counts[4][6] = 776 +counts[4][7] = 594 +counts[5][0] = 10084 +counts[5][1] = 5043 +counts[5][2] = 3363 +counts[5][3] = 2018 +counts[5][4] = 1442 +counts[5][5] = 918 +counts[5][6] = 777 +counts[5][7] = 594 +counts[6][0] = 10098 +counts[6][1] = 5050 +counts[6][2] = 3368 +counts[6][3] = 2021 +counts[6][4] = 1444 +counts[6][5] = 919 +counts[6][6] = 778 +counts[6][7] = 595 +counts[7][0] = 10113 +counts[7][1] = 5058 +counts[7][2] = 3373 +counts[7][3] = 2024 +counts[7][4] = 1446 +counts[7][5] = 921 +counts[7][6] = 779 +counts[7][7] = 596 +counts[8][0] = 10127 +counts[8][1] = 5065 +counts[8][2] = 3377 +counts[8][3] = 2027 +counts[8][4] = 1448 +counts[8][5] = 922 +counts[8][6] = 780 +counts[8][7] = 597 +counts[9][0] = 10142 +counts[9][1] = 5072 +counts[9][2] = 3382 +counts[9][3] = 2030 +counts[9][4] = 1450 +counts[9][5] = 923 +counts[9][6] = 781 +counts[9][7] = 598 +counts[10][0] = 10156 +counts[10][1] = 5079 +counts[10][2] = 3387 +counts[10][3] = 2033 +counts[10][4] = 1452 +counts[10][5] = 925 +counts[10][6] = 783 +counts[10][7] = 599 +counts[11][0] = 10170 +counts[11][1] = 5086 +counts[11][2] = 3392 +counts[11][3] = 2036 +counts[11][4] = 1454 +counts[11][5] = 926 +counts[11][6] = 784 +counts[11][7] = 599 +counts[12][0] = 10185 +counts[12][1] = 5094 +counts[12][2] = 3397 +counts[12][3] = 2039 +counts[12][4] = 1457 +counts[12][5] = 927 +counts[12][6] = 785 +counts[12][7] = 600 +counts[13][0] = 10200 +counts[13][1] = 5101 +counts[13][2] = 3402 +counts[13][3] = 2042 +counts[13][4] = 1459 +counts[13][5] = 929 +counts[13][6] = 786 +counts[13][7] = 601 +counts[14][0] = 10215 +counts[14][1] = 5109 +counts[14][2] = 3407 +counts[14][3] = 2045 +counts[14][4] = 1461 +counts[14][5] = 930 +counts[14][6] = 787 +counts[14][7] = 602 +counts[15][0] = 10230 +counts[15][1] = 5116 +counts[15][2] = 3412 +counts[15][3] = 2048 +counts[15][4] = 1463 +counts[15][5] = 931 +counts[15][6] = 788 +counts[15][7] = 603 +counts[16][0] = 10245 +counts[16][1] = 5124 +counts[16][2] = 3417 +counts[16][3] = 2051 +counts[16][4] = 1465 +counts[16][5] = 933 +counts[16][6] = 789 +counts[16][7] = 604 +counts[17][0] = 10260 +counts[17][1] = 5131 +counts[17][2] = 3422 +counts[17][3] = 2054 +counts[17][4] = 1467 +counts[17][5] = 934 +counts[17][6] = 791 +counts[17][7] = 605 +counts[18][0] = 10275 +counts[18][1] = 5139 +counts[18][2] = 3427 +counts[18][3] = 2057 +counts[18][4] = 1469 +counts[18][5] = 935 +counts[18][6] = 792 +counts[18][7] = 606 +counts[19][0] = 10290 +counts[19][1] = 5146 +counts[19][2] = 3432 +counts[19][3] = 2060 +counts[19][4] = 1472 +counts[19][5] = 937 +counts[19][6] = 793 +counts[19][7] = 607 +counts[20][0] = 10305 +counts[20][1] = 5154 +counts[20][2] = 3437 +counts[20][3] = 2063 +counts[20][4] = 1474 +counts[20][5] = 938 +counts[20][6] = 794 +counts[20][7] = 607 +counts[21][0] = 10320 +counts[21][1] = 5161 +counts[21][2] = 3442 +counts[21][3] = 2066 +counts[21][4] = 1476 +counts[21][5] = 940 +counts[21][6] = 795 +counts[21][7] = 608 +counts[22][0] = 10335 +counts[22][1] = 5169 +counts[22][2] = 3447 +counts[22][3] = 2069 +counts[22][4] = 1478 +counts[22][5] = 941 +counts[22][6] = 796 +counts[22][7] = 609 +counts[23][0] = 10350 +counts[23][1] = 5176 +counts[23][2] = 3452 +counts[23][3] = 2072 +counts[23][4] = 1480 +counts[23][5] = 942 +counts[23][6] = 798 +counts[23][7] = 610 *** END OF TEST SMPWAKEAFTER 1 *** diff --git a/testsuites/sptests/Makefile.am b/testsuites/sptests/Makefile.am index c5210a5ab9..43f3d82794 100644 --- a/testsuites/sptests/Makefile.am +++ b/testsuites/sptests/Makefile.am @@ -25,7 +25,7 @@ _SUBDIRS = \ spintrcritical05 spintrcritical06 spintrcritical07 spintrcritical08 \ spintrcritical09 spintrcritical10 spintrcritical11 spintrcritical12 \ spintrcritical13 spintrcritical14 spintrcritical15 spintrcritical16 \ - spintrcritical17 spintrcritical18 spmkdir spmountmgr01 spheapprot \ + spintrcritical18 spmkdir spmountmgr01 spheapprot \ sppagesize spsem01 spsem02 spsimplesched01 spsimplesched02 \ spsimplesched03 spnsext01 spedfsched01 spedfsched02 spedfsched03 \ spcbssched01 spcbssched02 spcbssched03 spqreslib sptimespec01 \ @@ -77,6 +77,7 @@ _SUBDIRS += speventsystem01 _SUBDIRS += spinternalerror01 _SUBDIRS += spinternalerror02 _SUBDIRS += sptimer_err01 sptimer_err02 +_SUBDIRS += sptimerserver01 _SUBDIRS += spclock_err02 if HAS_CPUSET diff --git a/testsuites/sptests/configure.ac b/testsuites/sptests/configure.ac index e46f6fa5a5..eeebc91171 100644 --- a/testsuites/sptests/configure.ac +++ b/testsuites/sptests/configure.ac @@ -46,6 +46,7 @@ AM_CONDITIONAL(HAS_SMP,test "$rtems_cv_RTEMS_SMP" = "yes") # Explicitly list all Makefiles here AC_CONFIG_FILES([Makefile +sptimerserver01/Makefile spsysinit01/Makefile splinkersets01/Makefile spstdthreads01/Makefile @@ -216,7 +217,6 @@ spintrcritical13/Makefile spintrcritical14/Makefile spintrcritical15/Makefile spintrcritical16/Makefile -spintrcritical17/Makefile spheapprot/Makefile spmkdir/Makefile spmountmgr01/Makefile diff --git a/testsuites/sptests/sp31/task1.c b/testsuites/sptests/sp31/task1.c index f4e526a027..c3f0ae13fc 100644 --- a/testsuites/sptests/sp31/task1.c +++ b/testsuites/sptests/sp31/task1.c @@ -40,14 +40,6 @@ static rtems_timer_service_routine Do_nothing( /* Do nothing */ } -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 ) @@ -119,10 +111,6 @@ rtems_task Task_1( "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", - schedule_time() - ); puts( "TA1 - rtems_task_wake_after - 1 second" ); status = rtems_task_wake_after( 1 * rtems_clock_get_ticks_per_second() ); @@ -139,11 +127,6 @@ rtems_task Task_1( "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", - schedule_time() - ); - rtems_test_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() ); @@ -160,11 +143,6 @@ rtems_task Task_1( "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", - schedule_time() - ); - rtems_test_assert( (info.start_time + info.initial) == schedule_time() ); puts( "TA1 - rtems_timer_cancel - timer 1" ); status = rtems_timer_cancel( tmid ); 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; } } } 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; } } } diff --git a/testsuites/sptests/spintrcritical10/init.c b/testsuites/sptests/spintrcritical10/init.c index e4a2a940a6..25be23a852 100644 --- a/testsuites/sptests/spintrcritical10/init.c +++ b/testsuites/sptests/spintrcritical10/init.c @@ -78,7 +78,7 @@ static void any_satisfy_before_timeout(rtems_id timer, void *arg) ); rtems_test_assert(thread->Wait.return_code == RTEMS_SUCCESSFUL); - _Thread_Timeout(0, thread); + _Thread_Timeout(&thread->Timer.Watchdog); rtems_test_assert( *(rtems_event_set *) thread->Wait.return_argument == GREEN @@ -175,7 +175,7 @@ static void all_satisfy_before_timeout(rtems_id timer, void *arg) ); rtems_test_assert(thread->Wait.return_code == RTEMS_SUCCESSFUL); - _Thread_Timeout(0, thread); + _Thread_Timeout(&thread->Timer.Watchdog); rtems_test_assert( *(rtems_event_set *) thread->Wait.return_argument == EVENTS @@ -251,7 +251,7 @@ static void timeout_before_satisfied(rtems_id timer, void *arg) ); rtems_test_assert(thread->Wait.return_code == RTEMS_SUCCESSFUL); - _Thread_Timeout(0, thread); + _Thread_Timeout(&thread->Timer.Watchdog); rtems_test_assert( *(rtems_event_set *) thread->Wait.return_argument == DEADBEEF diff --git a/testsuites/sptests/spintrcritical16/init.c b/testsuites/sptests/spintrcritical16/init.c index a094b419b3..3657c0607f 100644 --- a/testsuites/sptests/spintrcritical16/init.c +++ b/testsuites/sptests/spintrcritical16/init.c @@ -43,7 +43,7 @@ static rtems_timer_service_routine test_release_from_isr( } if ( Main_TCB->Wait.queue != NULL ) { - _Thread_Timeout( 0, Main_TCB ); + _Thread_Timeout( &Main_TCB->Timer.Watchdog ); } } diff --git a/testsuites/sptests/spintrcritical17/Makefile.am b/testsuites/sptests/spintrcritical17/Makefile.am deleted file mode 100644 index 20b372cf48..0000000000 --- a/testsuites/sptests/spintrcritical17/Makefile.am +++ /dev/null @@ -1,25 +0,0 @@ - -rtems_tests_PROGRAMS = spintrcritical17 -spintrcritical17_SOURCES = init.c \ - ../spintrcritical_support/intrcritical.c -spintrcritical17_SOURCES += ../spintrcritical_support/intrcritical.h - -dist_rtems_tests_DATA = spintrcritical17.scn -dist_rtems_tests_DATA += spintrcritical17.doc - -include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg -include $(top_srcdir)/../automake/compile.am -include $(top_srcdir)/../automake/leaf.am - - -AM_CPPFLAGS += -I$(top_srcdir)/../support/include -AM_CPPFLAGS += -I$(top_srcdir)/spintrcritical_support - -LINK_OBJS = $(spintrcritical17_OBJECTS) -LINK_LIBS = $(spintrcritical17_LDLIBS) - -spintrcritical17$(EXEEXT): $(spintrcritical17_OBJECTS) $(spintrcritical17_DEPENDENCIES) - @rm -f spintrcritical17$(EXEEXT) - $(make-exe) - -include $(top_srcdir)/../automake/local.am diff --git a/testsuites/sptests/spintrcritical17/init.c b/testsuites/sptests/spintrcritical17/init.c deleted file mode 100644 index 238493e71a..0000000000 --- a/testsuites/sptests/spintrcritical17/init.c +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (c) 2009-2014 embedded brains GmbH. - * - * embedded brains GmbH - * Dornierstr. 4 - * 82178 Puchheim - * Germany - * <rtems@embedded-brains.de> - * - * The license and distribution terms for this file may be - * found in the file LICENSE in this distribution or at - * http://www.rtems.org/license/LICENSE. - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include <tmacros.h> -#include <intrcritical.h> - -#include <rtems/rtems/timerimpl.h> - -const char rtems_test_name[] = "SPINTRCRITICAL 17"; - -typedef struct { - rtems_id timer1; - rtems_id timer2; - bool done; -} test_context; - -static test_context ctx_instance; - -static void never(rtems_id timer_id, void *arg) -{ - rtems_test_assert(0); -} - -static void fire(rtems_id timer_id, void *arg) -{ - /* The arg is NULL */ - test_context *ctx = &ctx_instance; - rtems_status_code sc; - - if (!ctx->done) { - ctx->done = - _Timer_server->Interval_watchdogs.system_watchdog_helper != NULL; - - if (ctx->done) { - sc = rtems_timer_server_fire_after(ctx->timer2, 100, never, NULL); - rtems_test_assert(sc == RTEMS_SUCCESSFUL); - } - } -} - -static bool test_body(void *arg) -{ - test_context *ctx = arg; - rtems_status_code sc; - - sc = rtems_timer_reset(ctx->timer1); - rtems_test_assert(sc == RTEMS_SUCCESSFUL); - - return ctx->done; -} - -static void Init(rtems_task_argument ignored) -{ - test_context *ctx = &ctx_instance; - rtems_status_code sc; - - TEST_BEGIN(); - - sc = rtems_timer_create( - rtems_build_name('T', 'I', 'M', '1'), - &ctx->timer1 - ); - rtems_test_assert(sc == RTEMS_SUCCESSFUL); - - sc = rtems_timer_create( - rtems_build_name('T', 'I', 'M', '2'), - &ctx->timer2 - ); - rtems_test_assert(sc == RTEMS_SUCCESSFUL); - - sc = rtems_timer_initiate_server( - RTEMS_MINIMUM_PRIORITY, - RTEMS_MINIMUM_STACK_SIZE, - RTEMS_DEFAULT_ATTRIBUTES - ); - rtems_test_assert(sc == RTEMS_SUCCESSFUL); - - sc = rtems_timer_server_fire_after(ctx->timer1, 1000, never, NULL); - rtems_test_assert(sc == RTEMS_SUCCESSFUL); - - interrupt_critical_section_test(test_body, ctx, fire); - rtems_test_assert(ctx->done); - - TEST_END(); - rtems_test_exit(0); -} - -#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER -#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER - -#define CONFIGURE_MICROSECONDS_PER_TICK 1000 - -#define CONFIGURE_MAXIMUM_TASKS 2 -#define CONFIGURE_MAXIMUM_TIMERS 3 -#define CONFIGURE_MAXIMUM_USER_EXTENSIONS 1 - -#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION - -#define CONFIGURE_RTEMS_INIT_TASKS_TABLE - -#define CONFIGURE_INIT - -#include <rtems/confdefs.h> diff --git a/testsuites/sptests/spintrcritical17/spintrcritical17.doc b/testsuites/sptests/spintrcritical17/spintrcritical17.doc deleted file mode 100644 index 809a9669d6..0000000000 --- a/testsuites/sptests/spintrcritical17/spintrcritical17.doc +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright (c) 2009-2015 embedded brains GmbH. -# -# The license and distribution terms for this file may be -# found in the file LICENSE in this distribution or at -# http://www.rtems.org/license/LICENSE. -# - -This file describes the directives and concepts tested by this test set. - -test set name: spintrcritical17 - -directives: - - _Timer_server_Update_system_watchdog - -concepts: - -+ Test critical sections which are only accessible through an interrupt. diff --git a/testsuites/sptests/spintrcritical17/spintrcritical17.scn b/testsuites/sptests/spintrcritical17/spintrcritical17.scn deleted file mode 100644 index 14566dfb3d..0000000000 --- a/testsuites/sptests/spintrcritical17/spintrcritical17.scn +++ /dev/null @@ -1,2 +0,0 @@ -*** TEST INTERRUPT CRITICAL SECTION 17 *** -*** END OF INTERRUPT CRITICAL SECTION 17 *** diff --git a/testsuites/sptests/spintrcritical20/init.c b/testsuites/sptests/spintrcritical20/init.c index 7e52211742..85c1645b5c 100644 --- a/testsuites/sptests/spintrcritical20/init.c +++ b/testsuites/sptests/spintrcritical20/init.c @@ -91,7 +91,7 @@ static bool test_body(void *arg) ctx->thread_queue_was_null = true; } - _Thread_Timeout(0, ctx->semaphore_task_tcb); + _Thread_Timeout(&ctx->semaphore_task_tcb->Timer.Watchdog); switch (ctx->semaphore_task_tcb->Wait.return_code) { case CORE_SEMAPHORE_STATUS_SUCCESSFUL: diff --git a/testsuites/sptests/spsize/size.c b/testsuites/sptests/spsize/size.c index e9470e384d..e19ca99606 100644 --- a/testsuites/sptests/spsize/size.c +++ b/testsuites/sptests/spsize/size.c @@ -391,8 +391,6 @@ uninitialized = /*userext.h*/ (sizeof _User_extensions_List) + /*watchdog.h*/ (sizeof _Watchdog_Ticks_since_boot) + - (sizeof _Watchdog_Ticks_header) + - (sizeof _Watchdog_Seconds_header) + /*wkspace.h*/ (sizeof _Workspace_Area); diff --git a/testsuites/sptests/sptimecounter01/init.c b/testsuites/sptests/sptimecounter01/init.c index 7b31064f54..d87ffec460 100644 --- a/testsuites/sptests/sptimecounter01/init.c +++ b/testsuites/sptests/sptimecounter01/init.c @@ -24,7 +24,6 @@ #include <rtems/score/timecounterimpl.h> #include <rtems/score/todimpl.h> -#include <rtems/score/watchdogimpl.h> #include <rtems/timecounter.h> #include <rtems/bsd.h> @@ -57,8 +56,6 @@ void boot_card(const char *cmdline) rtems_test_begink(); - _Watchdog_Handler_initialization(); - assert(time(NULL) == TOD_SECONDS_1970_THROUGH_1988); rtems_bsd_bintime(&bt); diff --git a/testsuites/sptests/sptimerserver01/Makefile.am b/testsuites/sptests/sptimerserver01/Makefile.am new file mode 100644 index 0000000000..2e5048d4e3 --- /dev/null +++ b/testsuites/sptests/sptimerserver01/Makefile.am @@ -0,0 +1,19 @@ +rtems_tests_PROGRAMS = sptimerserver01 +sptimerserver01_SOURCES = init.c + +dist_rtems_tests_DATA = sptimerserver01.scn sptimerserver01.doc + +include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg +include $(top_srcdir)/../automake/compile.am +include $(top_srcdir)/../automake/leaf.am + +AM_CPPFLAGS += -I$(top_srcdir)/../support/include + +LINK_OBJS = $(sptimerserver01_OBJECTS) +LINK_LIBS = $(sptimerserver01_LDLIBS) + +sptimerserver01$(EXEEXT): $(sptimerserver01_OBJECTS) $(sptimerserver01_DEPENDENCIES) + @rm -f sptimerserver01$(EXEEXT) + $(make-exe) + +include $(top_srcdir)/../automake/local.am diff --git a/testsuites/sptests/sptimerserver01/init.c b/testsuites/sptests/sptimerserver01/init.c new file mode 100644 index 0000000000..88f1fb3cf3 --- /dev/null +++ b/testsuites/sptests/sptimerserver01/init.c @@ -0,0 +1,129 @@ +/* + * Copyright (c) 2016 embedded brains GmbH. All rights reserved. + * + * embedded brains GmbH + * Dornierstr. 4 + * 82178 Puchheim + * Germany + * <rtems@embedded-brains.de> + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifdef HAVE_CONFIG_H + #include "config.h" +#endif + +#include "tmacros.h" + +const char rtems_test_name[] = "SPTIMERSERVER 1"; + +#define TIMER_COUNT 2 + +typedef struct { + rtems_id timer[TIMER_COUNT]; + rtems_id master; +} test_context; + +static test_context ctx_instance; + +static const rtems_time_of_day start = { + .year = 2016, + .month = 3, + .day = 1, + .hour = 12, + .minute = 5, + .second = 17 +}; + +static void cancel(rtems_id id, void *arg) +{ + test_context *ctx = arg; + rtems_status_code sc; + + sc = rtems_timer_cancel(ctx->timer[1]); + rtems_test_assert(sc == RTEMS_SUCCESSFUL); + + sc = rtems_event_transient_send(ctx->master); + rtems_test_assert(sc == RTEMS_SUCCESSFUL); +} + +static void never(rtems_id id, void *arg) +{ + rtems_test_assert(0); +} + +static void test(void) +{ + test_context *ctx = &ctx_instance; + rtems_status_code sc; + size_t i; + rtems_time_of_day later; + + ctx->master = rtems_task_self(); + + sc = rtems_timer_initiate_server( + RTEMS_MINIMUM_PRIORITY, + RTEMS_MINIMUM_STACK_SIZE, + RTEMS_DEFAULT_ATTRIBUTES + ); + rtems_test_assert(sc == RTEMS_SUCCESSFUL); + + for (i = 0; i < TIMER_COUNT; ++i) { + sc = rtems_timer_create( + rtems_build_name('T', 'M', 'R', '0' + i), + &ctx->timer[i] + ); + rtems_test_assert(sc == RTEMS_SUCCESSFUL); + } + + sc = rtems_timer_server_fire_after(ctx->timer[0], 10, cancel, ctx); + rtems_test_assert(sc == RTEMS_SUCCESSFUL); + + sc = rtems_timer_server_fire_after(ctx->timer[1], 10, never, NULL); + rtems_test_assert(sc == RTEMS_SUCCESSFUL); + + sc = rtems_event_transient_receive(RTEMS_WAIT, RTEMS_NO_TIMEOUT); + rtems_test_assert(sc == RTEMS_SUCCESSFUL); + + sc = rtems_clock_set(&start); + rtems_test_assert(sc == RTEMS_SUCCESSFUL); + + later = start; + ++later.second; + + sc = rtems_timer_server_fire_when(ctx->timer[0], &later, cancel, ctx); + rtems_test_assert(sc == RTEMS_SUCCESSFUL); + + sc = rtems_timer_server_fire_when(ctx->timer[1], &later, never, NULL); + rtems_test_assert(sc == RTEMS_SUCCESSFUL); + + sc = rtems_event_transient_receive(RTEMS_WAIT, RTEMS_NO_TIMEOUT); + rtems_test_assert(sc == RTEMS_SUCCESSFUL); +} + +static void Init(rtems_task_argument arg) +{ + TEST_BEGIN(); + + test(); + + TEST_END(); + rtems_test_exit(0); +} + +#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER +#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER + +#define CONFIGURE_MAXIMUM_TASKS 2 +#define CONFIGURE_MAXIMUM_TIMERS TIMER_COUNT + +#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION + +#define CONFIGURE_RTEMS_INIT_TASKS_TABLE + +#define CONFIGURE_INIT + +#include <rtems/confdefs.h> diff --git a/testsuites/sptests/sptimerserver01/sptimerserver01.doc b/testsuites/sptests/sptimerserver01/sptimerserver01.doc new file mode 100644 index 0000000000..c0dc4ef578 --- /dev/null +++ b/testsuites/sptests/sptimerserver01/sptimerserver01.doc @@ -0,0 +1,12 @@ +This file describes the directives and concepts tested by this test set. + +test set name: sptimerserver01 + +directives: + + - rtems_timer_cancel() + +concepts: + + - Ensure that pending timer server timers are cancelled via + rtems_timer_cancel(). diff --git a/testsuites/sptests/sptimerserver01/sptimerserver01.scn b/testsuites/sptests/sptimerserver01/sptimerserver01.scn new file mode 100644 index 0000000000..315f030c94 --- /dev/null +++ b/testsuites/sptests/sptimerserver01/sptimerserver01.scn @@ -0,0 +1,2 @@ +*** BEGIN OF TEST SPTIMERSERVER 1 *** +*** END OF TEST SPTIMERSERVER 1 *** diff --git a/testsuites/sptests/spwatchdog/init.c b/testsuites/sptests/spwatchdog/init.c index 025295b45b..3b08fb57e5 100644 --- a/testsuites/sptests/spwatchdog/init.c +++ b/testsuites/sptests/spwatchdog/init.c @@ -26,241 +26,192 @@ const char rtems_test_name[] = "SPWATCHDOG"; -static void test_watchdog_routine( Objects_Id id, void *arg ) -{ - (void) id; - (void) arg; - - rtems_test_assert( 0 ); -} +typedef struct { + Watchdog_Control Base; + int counter; +} test_watchdog; -static void init_watchdogs( - Watchdog_Header *header, - Watchdog_Control watchdogs[4] -) +static void test_watchdog_routine( Watchdog_Control *base ) { - Watchdog_Control *a = &watchdogs[0]; - Watchdog_Control *b = &watchdogs[1]; - Watchdog_Control *c = &watchdogs[2]; - Watchdog_Control *d = &watchdogs[3]; - - _Watchdog_Header_initialize( header ); - rtems_test_assert( _Watchdog_Is_empty( header ) ); - rtems_test_assert( _Chain_Is_empty( &header->Iterators ) ); - - _Watchdog_Preinitialize( c ); - c->initial = 6; - _Watchdog_Insert( header, c ); - rtems_test_assert( c->delta_interval == 6 ); - - rtems_test_assert( !_Watchdog_Is_empty( header ) ); - rtems_test_assert( _Chain_Is_empty( &header->Iterators ) ); - - _Watchdog_Preinitialize( a ); - a->initial = 2; - _Watchdog_Insert( header, a ); - rtems_test_assert( a->delta_interval == 2 ); - rtems_test_assert( c->delta_interval == 4 ); - - _Watchdog_Preinitialize( b ); - b->initial = 4; - _Watchdog_Insert( header, b ); - rtems_test_assert( a->delta_interval == 2 ); - rtems_test_assert( b->delta_interval == 2 ); - rtems_test_assert( c->delta_interval == 2 ); - - _Watchdog_Preinitialize( d ); -} + test_watchdog *watchdog = (test_watchdog *) base; -static void destroy_watchdogs( - Watchdog_Header *header -) -{ - _ISR_lock_Destroy( &header->Lock ); + ++watchdog->counter; } -static void add_iterator( - Watchdog_Header *header, - Watchdog_Iterator *i, - Watchdog_Control *w -) +static void test_watchdog_static_init( void ) { - _Chain_Append_unprotected( &header->Iterators, &i->Node ); - i->delta_interval = 2; - i->current = &w->Node; -} + static Watchdog_Control a = WATCHDOG_INITIALIZER( + test_watchdog_routine + ); + Watchdog_Control b; -static void test_watchdog_insert_and_remove( void ) -{ - Watchdog_Header header; - Watchdog_Control watchdogs[4]; - Watchdog_Control *a = &watchdogs[0]; - Watchdog_Control *b = &watchdogs[1]; - Watchdog_Control *c = &watchdogs[2]; - Watchdog_Control *d = &watchdogs[3]; - Watchdog_Iterator i; - - init_watchdogs( &header, watchdogs ); - add_iterator( &header, &i, c ); - - /* Remove next watchdog of iterator */ - _Watchdog_Remove( &header, c ); - rtems_test_assert( i.delta_interval == 4 ); - rtems_test_assert( i.current == &b->Node ); - - /* Remove watchdog before the current watchdog of iterator */ - _Watchdog_Remove( &header, a ); - rtems_test_assert( i.delta_interval == 6 ); - rtems_test_assert( i.current == &b->Node ); - - /* Remove current (= last) watchdog of iterator */ - _Watchdog_Remove( &header, b ); - rtems_test_assert( i.delta_interval == 6 ); - rtems_test_assert( i.current == _Chain_Head( &header.Watchdogs ) ); - - /* Insert first watchdog */ - a->initial = 1; - _Watchdog_Insert( &header, a ); - rtems_test_assert( i.delta_interval == 6 ); - rtems_test_assert( i.current == _Chain_Head( &header.Watchdogs ) ); - - destroy_watchdogs( &header ); - init_watchdogs( &header, watchdogs ); - add_iterator( &header, &i, b ); - - /* Insert right before current watchdog of iterator */ - d->initial = 3; - _Watchdog_Insert( &header, d ); - rtems_test_assert( i.delta_interval == 2 ); - rtems_test_assert( i.current == &d->Node ); - - destroy_watchdogs( &header ); - init_watchdogs( &header, watchdogs ); - add_iterator( &header, &i, b ); - - /* Insert right after current watchdog of iterator */ - d->initial = 5; - _Watchdog_Insert( &header, d ); - rtems_test_assert( i.delta_interval == 2 ); - rtems_test_assert( i.current == &b->Node ); - - destroy_watchdogs( &header ); + memset( &b, 0, sizeof( b ) ); + _Watchdog_Preinitialize( &b, _Per_CPU_Get_by_index( 0 ) ); + _Watchdog_Initialize( + &b, + test_watchdog_routine + ); + + rtems_test_assert( memcmp( &a, &b, sizeof( a ) ) == 0 ); } -static void init_watchdogs_remove_second_and_insert_first( - Watchdog_Header *header, - Watchdog_Control watchdogs[3] -) +static bool test_watchdog_is_inactive( test_watchdog *watchdog ) { - Watchdog_Control *a = &watchdogs[0]; - Watchdog_Control *b = &watchdogs[1]; - Watchdog_Control *c = &watchdogs[2]; - - _Watchdog_Preinitialize( a ); - _Watchdog_Preinitialize( b ); - _Watchdog_Preinitialize( c ); - - _Watchdog_Header_initialize( header ); - - a->initial = 6; - _Watchdog_Insert( header, a ); - rtems_test_assert( a->delta_interval == 6 ); - - b->initial = 8; - _Watchdog_Insert( header, b ); - rtems_test_assert( a->delta_interval == 6 ); - rtems_test_assert( b->delta_interval == 2 ); + return _Watchdog_Get_state( &watchdog->Base ) == WATCHDOG_INACTIVE; } -static void test_watchdog_remove_second_and_insert_first( void ) +static void test_watchdog_init( test_watchdog *watchdog, int counter ) { - Watchdog_Header header; - Watchdog_Control watchdogs[3]; - Watchdog_Control *a = &watchdogs[0]; - Watchdog_Control *b = &watchdogs[1]; - Watchdog_Control *c = &watchdogs[2]; - Watchdog_Iterator i; - - init_watchdogs_remove_second_and_insert_first( &header, watchdogs ); - add_iterator( &header, &i, b ); - - _Watchdog_Remove( &header, b ); - rtems_test_assert( i.delta_interval == 8 ); - rtems_test_assert( i.current == &a->Node ); - - c->initial = 4; - _Watchdog_Insert( &header, c ); - rtems_test_assert( a->delta_interval == 2 ); - rtems_test_assert( c->delta_interval == 4 ); - rtems_test_assert( i.delta_interval == 8 ); - rtems_test_assert( i.current == &c->Node ); - - destroy_watchdogs( &header ); + _Watchdog_Preinitialize( &watchdog->Base, _Per_CPU_Get_snapshot() ); + _Watchdog_Initialize( &watchdog->Base, test_watchdog_routine ); + rtems_test_assert( test_watchdog_is_inactive( watchdog ) ) ; + watchdog->counter = counter; } -static void init_watchdogs_insert_with_iterator( - Watchdog_Header *header, - Watchdog_Control watchdogs[2] -) +static uint64_t test_watchdog_tick( Watchdog_Header *header, uint64_t now ) { - Watchdog_Control *a = &watchdogs[0]; - Watchdog_Control *b = &watchdogs[1]; + ISR_LOCK_DEFINE( , lock, "Test" ) + ISR_lock_Context lock_context; - _Watchdog_Preinitialize( a ); - _Watchdog_Preinitialize( b ); + _ISR_lock_ISR_disable_and_acquire( &lock, &lock_context ); + ++now; + _Watchdog_Tickle( header, now, &lock, &lock_context ); + _ISR_lock_Destroy( &lock ); - _Watchdog_Header_initialize( header ); - - a->initial = 6; - _Watchdog_Insert( header, a ); - rtems_test_assert( a->delta_interval == 6 ); + return now; } -static void test_watchdog_insert_with_iterator( void ) +static void test_watchdog_operations( void ) { Watchdog_Header header; - Watchdog_Control watchdogs[2]; - Watchdog_Control *a = &watchdogs[0]; - Watchdog_Control *b = &watchdogs[1]; - Watchdog_Iterator i; - - init_watchdogs_insert_with_iterator( &header, watchdogs ); - add_iterator( &header, &i, a ); - - b->initial = 4; - _Watchdog_Insert( &header, b ); - rtems_test_assert( a->delta_interval == 2 ); - rtems_test_assert( b->delta_interval == 4 ); - rtems_test_assert( i.delta_interval == 2 ); - rtems_test_assert( i.current == &b->Node ); - - destroy_watchdogs( &header ); -} - -static void test_watchdog_static_init( void ) -{ - #if defined(RTEMS_USE_16_BIT_OBJECT) - #define JUNK_ID 0x1234 - #else - #define JUNK_ID 0x12345678 - #endif - - static Watchdog_Control a = WATCHDOG_INITIALIZER( - test_watchdog_routine, - JUNK_ID, - (void *) 0xdeadbeef - ); - Watchdog_Control b; - - memset( &b, 0, sizeof( b ) ); - _Watchdog_Initialize( - &b, - test_watchdog_routine, - JUNK_ID, - (void *) 0xdeadbeef - ); - - rtems_test_assert( memcmp( &a, &b, sizeof( a ) ) == 0 ); + uint64_t now; + test_watchdog a; + test_watchdog b; + test_watchdog c; + + _Watchdog_Header_initialize( &header ); + rtems_test_assert( _RBTree_Is_empty( &header.Watchdogs ) ); + rtems_test_assert( header.first == NULL ); + + test_watchdog_init( &a, 10 ); + test_watchdog_init( &b, 20 ); + test_watchdog_init( &c, 30 ); + + now = 0; + now = test_watchdog_tick( &header, now ); + + _Watchdog_Insert( &header, &a.Base, now + 1 ); + rtems_test_assert( header.first == &a.Base.Node.RBTree ); + rtems_test_assert( !test_watchdog_is_inactive( &a ) ) ; + rtems_test_assert( a.Base.expire == 2 ); + rtems_test_assert( a.counter == 10 ); + + _Watchdog_Remove( &header, &a.Base ); + rtems_test_assert( header.first == NULL ); + rtems_test_assert( test_watchdog_is_inactive( &a ) ) ; + rtems_test_assert( a.Base.expire == 2 ); + rtems_test_assert( a.counter == 10 ); + + _Watchdog_Remove( &header, &a.Base ); + rtems_test_assert( header.first == NULL ); + rtems_test_assert( test_watchdog_is_inactive( &a ) ) ; + rtems_test_assert( a.Base.expire == 2 ); + rtems_test_assert( a.counter == 10 ); + + _Watchdog_Insert( &header, &a.Base, now + 1 ); + rtems_test_assert( header.first == &a.Base.Node.RBTree ); + rtems_test_assert( !test_watchdog_is_inactive( &a ) ) ; + rtems_test_assert( a.Base.expire == 2 ); + rtems_test_assert( a.counter == 10 ); + + _Watchdog_Insert( &header, &b.Base, now + 1 ); + rtems_test_assert( header.first == &a.Base.Node.RBTree ); + rtems_test_assert( !test_watchdog_is_inactive( &b ) ) ; + rtems_test_assert( b.Base.expire == 2 ); + rtems_test_assert( b.counter == 20 ); + + _Watchdog_Insert( &header, &c.Base, now + 2 ); + rtems_test_assert( header.first == &a.Base.Node.RBTree ); + rtems_test_assert( !test_watchdog_is_inactive( &c ) ) ; + rtems_test_assert( c.Base.expire == 3 ); + rtems_test_assert( c.counter == 30 ); + + _Watchdog_Remove( &header, &a.Base ); + rtems_test_assert( header.first == &b.Base.Node.RBTree ); + rtems_test_assert( test_watchdog_is_inactive( &a ) ) ; + rtems_test_assert( a.Base.expire == 2 ); + rtems_test_assert( a.counter == 10 ); + + _Watchdog_Remove( &header, &b.Base ); + rtems_test_assert( header.first == &c.Base.Node.RBTree ); + rtems_test_assert( test_watchdog_is_inactive( &b ) ) ; + rtems_test_assert( b.Base.expire == 2 ); + rtems_test_assert( b.counter == 20 ); + + _Watchdog_Remove( &header, &c.Base ); + rtems_test_assert( header.first == NULL ); + rtems_test_assert( test_watchdog_is_inactive( &c ) ) ; + rtems_test_assert( c.Base.expire == 3 ); + rtems_test_assert( c.counter == 30 ); + + _Watchdog_Insert( &header, &a.Base, now + 2 ); + rtems_test_assert( header.first == &a.Base.Node.RBTree ); + rtems_test_assert( !test_watchdog_is_inactive( &a ) ) ; + rtems_test_assert( a.Base.expire == 3 ); + rtems_test_assert( a.counter == 10 ); + + _Watchdog_Insert( &header, &b.Base, now + 2 ); + rtems_test_assert( header.first == &a.Base.Node.RBTree ); + rtems_test_assert( !test_watchdog_is_inactive( &b ) ) ; + rtems_test_assert( b.Base.expire == 3 ); + rtems_test_assert( b.counter == 20 ); + + _Watchdog_Insert( &header, &c.Base, now + 3 ); + rtems_test_assert( header.first == &a.Base.Node.RBTree ); + rtems_test_assert( !test_watchdog_is_inactive( &c ) ) ; + rtems_test_assert( c.Base.expire == 4 ); + rtems_test_assert( c.counter == 30 ); + + now = test_watchdog_tick( &header, now ); + rtems_test_assert( !_RBTree_Is_empty( &header.Watchdogs ) ); + rtems_test_assert( header.first == &a.Base.Node.RBTree ); + rtems_test_assert( !test_watchdog_is_inactive( &a ) ) ; + rtems_test_assert( a.Base.expire == 3 ); + rtems_test_assert( a.counter == 10 ); + rtems_test_assert( !test_watchdog_is_inactive( &b ) ) ; + rtems_test_assert( b.Base.expire == 3 ); + rtems_test_assert( b.counter == 20 ); + rtems_test_assert( !test_watchdog_is_inactive( &c ) ) ; + rtems_test_assert( c.Base.expire == 4 ); + rtems_test_assert( c.counter == 30 ); + + now = test_watchdog_tick( &header, now ); + rtems_test_assert( !_RBTree_Is_empty( &header.Watchdogs ) ); + rtems_test_assert( header.first == &c.Base.Node.RBTree ); + rtems_test_assert( test_watchdog_is_inactive( &a ) ) ; + rtems_test_assert( a.Base.expire == 3 ); + rtems_test_assert( a.counter == 11 ); + rtems_test_assert( test_watchdog_is_inactive( &b ) ) ; + rtems_test_assert( b.Base.expire == 3 ); + rtems_test_assert( b.counter == 21 ); + rtems_test_assert( !test_watchdog_is_inactive( &c ) ) ; + rtems_test_assert( c.Base.expire == 4 ); + rtems_test_assert( c.counter == 30 ); + + now = test_watchdog_tick( &header, now ); + rtems_test_assert( _RBTree_Is_empty( &header.Watchdogs ) ); + rtems_test_assert( header.first == NULL ); + rtems_test_assert( test_watchdog_is_inactive( &a ) ) ; + rtems_test_assert( a.Base.expire == 3 ); + rtems_test_assert( a.counter == 11 ); + rtems_test_assert( test_watchdog_is_inactive( &b ) ) ; + rtems_test_assert( b.Base.expire == 3 ); + rtems_test_assert( b.counter == 21 ); + rtems_test_assert( test_watchdog_is_inactive( &c ) ) ; + rtems_test_assert( c.Base.expire == 4 ); + rtems_test_assert( c.counter == 31 ); + + _Watchdog_Header_destroy( &header ); } rtems_task Init( @@ -272,10 +223,8 @@ rtems_task Init( TEST_BEGIN(); + test_watchdog_operations(); test_watchdog_static_init(); - test_watchdog_insert_and_remove(); - test_watchdog_remove_second_and_insert_first(); - test_watchdog_insert_with_iterator(); build_time( &time, 12, 31, 1988, 9, 0, 0, 0 ); diff --git a/testsuites/tmtests/tmtimer01/tmtimer01.scn b/testsuites/tmtests/tmtimer01/tmtimer01.scn index ea882d415f..db3ca01d27 100644 --- a/testsuites/tmtests/tmtimer01/tmtimer01.scn +++ b/testsuites/tmtests/tmtimer01/tmtimer01.scn @@ -1,137 +1,137 @@ <TMTimer01 timerCount="65504"> <Sample> - <ActiveTimers>0</ActiveTimers><First unit="ns">6397</First><Middle unit="ns">3290</Middle><Last unit="ns">1527</Last> + <ActiveTimers>0</ActiveTimers><First unit="ns">8812</First><Middle unit="ns">1412</Middle><Last unit="ns">917</Last> </Sample> <Sample> - <ActiveTimers>2</ActiveTimers><First unit="ns">1986</First><Middle unit="ns">1550</Middle><Last unit="ns">1314</Last> + <ActiveTimers>2</ActiveTimers><First unit="ns">1602</First><Middle unit="ns">1010</Middle><Last unit="ns">1367</Last> </Sample> <Sample> - <ActiveTimers>4</ActiveTimers><First unit="ns">1551</First><Middle unit="ns">2134</Middle><Last unit="ns">3072</Last> + <ActiveTimers>4</ActiveTimers><First unit="ns">1524</First><Middle unit="ns">1089</Middle><Last unit="ns">1086</Last> </Sample> <Sample> - <ActiveTimers>7</ActiveTimers><First unit="ns">2545</First><Middle unit="ns">3511</Middle><Last unit="ns">3404</Last> + <ActiveTimers>7</ActiveTimers><First unit="ns">1791</First><Middle unit="ns">1121</Middle><Last unit="ns">1838</Last> </Sample> <Sample> - <ActiveTimers>10</ActiveTimers><First unit="ns">1595</First><Middle unit="ns">2363</Middle><Last unit="ns">4287</Last> + <ActiveTimers>10</ActiveTimers><First unit="ns">1488</First><Middle unit="ns">1016</Middle><Last unit="ns">2134</Last> </Sample> <Sample> - <ActiveTimers>14</ActiveTimers><First unit="ns">1473</First><Middle unit="ns">2740</Middle><Last unit="ns">6069</Last> + <ActiveTimers>14</ActiveTimers><First unit="ns">1527</First><Middle unit="ns">1698</Middle><Last unit="ns">3186</Last> </Sample> <Sample> - <ActiveTimers>19</ActiveTimers><First unit="ns">1566</First><Middle unit="ns">3195</Middle><Last unit="ns">5993</Last> + <ActiveTimers>19</ActiveTimers><First unit="ns">2078</First><Middle unit="ns">1665</Middle><Last unit="ns">3397</Last> </Sample> <Sample> - <ActiveTimers>25</ActiveTimers><First unit="ns">1251</First><Middle unit="ns">2718</Middle><Last unit="ns">7307</Last> + <ActiveTimers>25</ActiveTimers><First unit="ns">1519</First><Middle unit="ns">2368</Middle><Last unit="ns">4464</Last> </Sample> <Sample> - <ActiveTimers>32</ActiveTimers><First unit="ns">2302</First><Middle unit="ns">5690</Middle><Last unit="ns">10269</Last> + <ActiveTimers>32</ActiveTimers><First unit="ns">1243</First><Middle unit="ns">2623</Middle><Last unit="ns">3549</Last> </Sample> <Sample> - <ActiveTimers>41</ActiveTimers><First unit="ns">1522</First><Middle unit="ns">8221</Middle><Last unit="ns">13424</Last> + <ActiveTimers>41</ActiveTimers><First unit="ns">2368</First><Middle unit="ns">2578</Middle><Last unit="ns">4105</Last> </Sample> <Sample> - <ActiveTimers>52</ActiveTimers><First unit="ns">1799</First><Middle unit="ns">8455</Middle><Last unit="ns">14820</Last> + <ActiveTimers>52</ActiveTimers><First unit="ns">2322</First><Middle unit="ns">2563</Middle><Last unit="ns">4126</Last> </Sample> <Sample> - <ActiveTimers>66</ActiveTimers><First unit="ns">1062</First><Middle unit="ns">12480</Middle><Last unit="ns">16590</Last> + <ActiveTimers>66</ActiveTimers><First unit="ns">2499</First><Middle unit="ns">1855</Middle><Last unit="ns">4919</Last> </Sample> <Sample> - <ActiveTimers>83</ActiveTimers><First unit="ns">1384</First><Middle unit="ns">11710</Middle><Last unit="ns">21854</Last> + <ActiveTimers>83</ActiveTimers><First unit="ns">1689</First><Middle unit="ns">3128</Middle><Last unit="ns">5894</Last> </Sample> <Sample> - <ActiveTimers>104</ActiveTimers><First unit="ns">1666</First><Middle unit="ns">15200</Middle><Last unit="ns">30951</Last> + <ActiveTimers>104</ActiveTimers><First unit="ns">2301</First><Middle unit="ns">2647</Middle><Last unit="ns">4595</Last> </Sample> <Sample> - <ActiveTimers>130</ActiveTimers><First unit="ns">1345</First><Middle unit="ns">17154</Middle><Last unit="ns">37942</Last> + <ActiveTimers>130</ActiveTimers><First unit="ns">2880</First><Middle unit="ns">3183</Middle><Last unit="ns">6222</Last> </Sample> <Sample> - <ActiveTimers>162</ActiveTimers><First unit="ns">1369</First><Middle unit="ns">22381</Middle><Last unit="ns">46929</Last> + <ActiveTimers>162</ActiveTimers><First unit="ns">2597</First><Middle unit="ns">2376</Middle><Last unit="ns">7118</Last> </Sample> <Sample> - <ActiveTimers>201</ActiveTimers><First unit="ns">2271</First><Middle unit="ns">35625</Middle><Last unit="ns">59972</Last> + <ActiveTimers>201</ActiveTimers><First unit="ns">3519</First><Middle unit="ns">3466</Middle><Last unit="ns">6673</Last> </Sample> <Sample> - <ActiveTimers>249</ActiveTimers><First unit="ns">1279</First><Middle unit="ns">37271</Middle><Last unit="ns">69662</Last> + <ActiveTimers>249</ActiveTimers><First unit="ns">2829</First><Middle unit="ns">3177</Middle><Last unit="ns">7784</Last> </Sample> <Sample> - <ActiveTimers>308</ActiveTimers><First unit="ns">864</First><Middle unit="ns">44580</Middle><Last unit="ns">87633</Last> + <ActiveTimers>308</ActiveTimers><First unit="ns">2614</First><Middle unit="ns">3396</Middle><Last unit="ns">7338</Last> </Sample> <Sample> - <ActiveTimers>381</ActiveTimers><First unit="ns">1078</First><Middle unit="ns">53821</Middle><Last unit="ns">106376</Last> + <ActiveTimers>381</ActiveTimers><First unit="ns">3454</First><Middle unit="ns">4888</Middle><Last unit="ns">9114</Last> </Sample> <Sample> - <ActiveTimers>470</ActiveTimers><First unit="ns">913</First><Middle unit="ns">67021</Middle><Last unit="ns">133201</Last> + <ActiveTimers>470</ActiveTimers><First unit="ns">3397</First><Middle unit="ns">2443</Middle><Last unit="ns">7689</Last> </Sample> <Sample> - <ActiveTimers>580</ActiveTimers><First unit="ns">1870</First><Middle unit="ns">79863</Middle><Last unit="ns">169394</Last> + <ActiveTimers>580</ActiveTimers><First unit="ns">2233</First><Middle unit="ns">4410</Middle><Last unit="ns">9355</Last> </Sample> <Sample> - <ActiveTimers>715</ActiveTimers><First unit="ns">1732</First><Middle unit="ns">99965</Middle><Last unit="ns">208901</Last> + <ActiveTimers>715</ActiveTimers><First unit="ns">3787</First><Middle unit="ns">5891</Middle><Last unit="ns">6833</Last> </Sample> <Sample> - <ActiveTimers>881</ActiveTimers><First unit="ns">1503</First><Middle unit="ns">138820</Middle><Last unit="ns">259314</Last> + <ActiveTimers>881</ActiveTimers><First unit="ns">3839</First><Middle unit="ns">5089</Middle><Last unit="ns">9232</Last> </Sample> <Sample> - <ActiveTimers>1085</ActiveTimers><First unit="ns">1096</First><Middle unit="ns">166404</Middle><Last unit="ns">337461</Last> + <ActiveTimers>1085</ActiveTimers><First unit="ns">2838</First><Middle unit="ns">2739</Middle><Last unit="ns">11575</Last> </Sample> <Sample> - <ActiveTimers>1336</ActiveTimers><First unit="ns">1383</First><Middle unit="ns">209434</Middle><Last unit="ns">445806</Last> + <ActiveTimers>1336</ActiveTimers><First unit="ns">3256</First><Middle unit="ns">5011</Middle><Last unit="ns">9684</Last> </Sample> <Sample> - <ActiveTimers>1645</ActiveTimers><First unit="ns">1787</First><Middle unit="ns">253904</Middle><Last unit="ns">533644</Last> + <ActiveTimers>1645</ActiveTimers><First unit="ns">2293</First><Middle unit="ns">5262</Middle><Last unit="ns">10183</Last> </Sample> <Sample> - <ActiveTimers>2025</ActiveTimers><First unit="ns">2082</First><Middle unit="ns">327384</Middle><Last unit="ns">657141</Last> + <ActiveTimers>2025</ActiveTimers><First unit="ns">4436</First><Middle unit="ns">5934</Middle><Last unit="ns">8804</Last> </Sample> <Sample> - <ActiveTimers>2492</ActiveTimers><First unit="ns">1843</First><Middle unit="ns">417457</Middle><Last unit="ns">814380</Last> + <ActiveTimers>2492</ActiveTimers><First unit="ns">4506</First><Middle unit="ns">7284</Middle><Last unit="ns">10389</Last> </Sample> <Sample> - <ActiveTimers>3067</ActiveTimers><First unit="ns">1980</First><Middle unit="ns">493511</Middle><Last unit="ns">977427</Last> + <ActiveTimers>3067</ActiveTimers><First unit="ns">3832</First><Middle unit="ns">4990</Middle><Last unit="ns">9536</Last> </Sample> <Sample> - <ActiveTimers>3774</ActiveTimers><First unit="ns">2695</First><Middle unit="ns">622065</Middle><Last unit="ns">1237577</Last> + <ActiveTimers>3774</ActiveTimers><First unit="ns">5088</First><Middle unit="ns">4888</Middle><Last unit="ns">9633</Last> </Sample> <Sample> - <ActiveTimers>4644</ActiveTimers><First unit="ns">1463</First><Middle unit="ns">827565</Middle><Last unit="ns">1565553</Last> + <ActiveTimers>4644</ActiveTimers><First unit="ns">5590</First><Middle unit="ns">5749</Middle><Last unit="ns">8975</Last> </Sample> <Sample> - <ActiveTimers>5714</ActiveTimers><First unit="ns">1866</First><Middle unit="ns">1053458</Middle><Last unit="ns">1914932</Last> + <ActiveTimers>5714</ActiveTimers><First unit="ns">4854</First><Middle unit="ns">6813</Middle><Last unit="ns">11603</Last> </Sample> <Sample> - <ActiveTimers>7030</ActiveTimers><First unit="ns">3481</First><Middle unit="ns">1266198</Middle><Last unit="ns">2450199</Last> + <ActiveTimers>7030</ActiveTimers><First unit="ns">6139</First><Middle unit="ns">6132</Middle><Last unit="ns">12630</Last> </Sample> <Sample> - <ActiveTimers>8649</ActiveTimers><First unit="ns">2773</First><Middle unit="ns">1558351</Middle><Last unit="ns">2967472</Last> + <ActiveTimers>8649</ActiveTimers><First unit="ns">6877</First><Middle unit="ns">3852</Middle><Last unit="ns">10973</Last> </Sample> <Sample> - <ActiveTimers>10640</ActiveTimers><First unit="ns">2086</First><Middle unit="ns">2003884</Middle><Last unit="ns">3766161</Last> + <ActiveTimers>10640</ActiveTimers><First unit="ns">6532</First><Middle unit="ns">6097</Middle><Last unit="ns">11725</Last> </Sample> <Sample> - <ActiveTimers>13089</ActiveTimers><First unit="ns">3911</First><Middle unit="ns">2501427</Middle><Last unit="ns">4619553</Last> + <ActiveTimers>13089</ActiveTimers><First unit="ns">5284</First><Middle unit="ns">5392</Middle><Last unit="ns">13246</Last> </Sample> <Sample> - <ActiveTimers>16101</ActiveTimers><First unit="ns">3276</First><Middle unit="ns">3189159</Middle><Last unit="ns">5886373</Last> + <ActiveTimers>16101</ActiveTimers><First unit="ns">7077</First><Middle unit="ns">7572</Middle><Last unit="ns">14820</Last> </Sample> <Sample> - <ActiveTimers>19806</ActiveTimers><First unit="ns">3801</First><Middle unit="ns">4005049</Middle><Last unit="ns">7394938</Last> + <ActiveTimers>19806</ActiveTimers><First unit="ns">7132</First><Middle unit="ns">8335</Middle><Last unit="ns">11668</Last> </Sample> <Sample> - <ActiveTimers>24363</ActiveTimers><First unit="ns">3088</First><Middle unit="ns">4977788</Middle><Last unit="ns">9138839</Last> + <ActiveTimers>24363</ActiveTimers><First unit="ns">8676</First><Middle unit="ns">7919</Middle><Last unit="ns">13937</Last> </Sample> <Sample> - <ActiveTimers>29968</ActiveTimers><First unit="ns">4089</First><Middle unit="ns">6133462</Middle><Last unit="ns">11361012</Last> + <ActiveTimers>29968</ActiveTimers><First unit="ns">5970</First><Middle unit="ns">10978</Middle><Last unit="ns">16035</Last> </Sample> <Sample> - <ActiveTimers>36862</ActiveTimers><First unit="ns">2059</First><Middle unit="ns">7870138</Middle><Last unit="ns">14319206</Last> + <ActiveTimers>36862</ActiveTimers><First unit="ns">8804</First><Middle unit="ns">8767</Middle><Last unit="ns">13089</Last> </Sample> <Sample> - <ActiveTimers>45342</ActiveTimers><First unit="ns">2224</First><Middle unit="ns">9917100</Middle><Last unit="ns">17754441</Last> + <ActiveTimers>45342</ActiveTimers><First unit="ns">8608</First><Middle unit="ns">10305</Middle><Last unit="ns">15709</Last> </Sample> <Sample> - <ActiveTimers>55772</ActiveTimers><First unit="ns">1979</First><Middle unit="ns">11815557</Middle><Last unit="ns">21907509</Last> + <ActiveTimers>55772</ActiveTimers><First unit="ns">8949</First><Middle unit="ns">10031</Middle><Last unit="ns">16262</Last> </Sample> <Sample> - <ActiveTimers>65503</ActiveTimers><First unit="ns">2404</First><Middle unit="ns">13694591</Middle><Last unit="ns">26215885</Last> + <ActiveTimers>65503</ActiveTimers><First unit="ns">9199</First><Middle unit="ns">10309</Middle><Last unit="ns">19090</Last> </Sample> </TMTimer01> |