From dfc6f3dc11e534f2e71096eea3d846f8e0e0379c Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 10 May 2007 19:31:36 +0000 Subject: 2007-05-10 Joel Sherrill * ticker/Makefile.am, ticker/init.c, ticker/system.h, ticker/tasks.c: Test needs clock manager. Should use rtems_test_exit() instead of exit(). --- testsuites/samples/ticker/Makefile.am | 2 +- testsuites/samples/ticker/init.c | 1 - testsuites/samples/ticker/system.h | 7 +++++-- testsuites/samples/ticker/tasks.c | 4 +--- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'testsuites/samples/ticker') diff --git a/testsuites/samples/ticker/Makefile.am b/testsuites/samples/ticker/Makefile.am index b501e6ad34..8426951892 100644 --- a/testsuites/samples/ticker/Makefile.am +++ b/testsuites/samples/ticker/Makefile.am @@ -2,7 +2,7 @@ ## $Id$ ## -MANAGERS = io +MANAGERS = io clock rtems_tests_PROGRAMS = ticker.exe ticker_exe_SOURCES = init.c tasks.c system.h diff --git a/testsuites/samples/ticker/init.c b/testsuites/samples/ticker/init.c index e71c05140f..1715adefc0 100644 --- a/testsuites/samples/ticker/init.c +++ b/testsuites/samples/ticker/init.c @@ -22,7 +22,6 @@ #define CONFIGURE_INIT #include "system.h" -#include /* * Keep the names and IDs in global variables so another task can use them. diff --git a/testsuites/samples/ticker/system.h b/testsuites/samples/ticker/system.h index b08e22b11a..0ae695486c 100644 --- a/testsuites/samples/ticker/system.h +++ b/testsuites/samples/ticker/system.h @@ -15,6 +15,7 @@ #include #include +#include "../../support/include/buffer_test_io.h" /* functions */ @@ -40,8 +41,11 @@ extern rtems_name Task_name[ 4 ]; /* array of task names */ #include /* for device driver prototypes */ -#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER +#if defined(CONFIGURE_INIT) +int atexit(void (*function)(void)){} +#endif #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER +#define CONFIGURE_DISABLE_NEWLIB_REENTRANCY #define CONFIGURE_MAXIMUM_TASKS 4 @@ -64,7 +68,6 @@ extern rtems_name Task_name[ 4 ]; /* array of task names */ printf( "%s%02" PRId32 ":%02" PRId32 ":%02" PRId32 " %02" PRId32 "/%02" PRId32 "/%04" PRId32 "%s", \ _s1, (_tb)->hour, (_tb)->minute, (_tb)->second, \ (_tb)->month, (_tb)->day, (_tb)->year, _s2 ); \ - fflush(stdout); \ } while ( 0 ) /* diff --git a/testsuites/samples/ticker/tasks.c b/testsuites/samples/ticker/tasks.c index e59557ed91..d9c3791185 100644 --- a/testsuites/samples/ticker/tasks.c +++ b/testsuites/samples/ticker/tasks.c @@ -18,8 +18,6 @@ */ #include "system.h" -#include -#include rtems_task Test_task( rtems_task_argument unused @@ -36,7 +34,7 @@ rtems_task Test_task( status = rtems_clock_get( RTEMS_CLOCK_GET_TOD, &time ); if ( time.second >= 35 ) { puts( "*** END OF CLOCK TICK TEST ***" ); - exit( 0 ); + rtems_test_exit( 0 ); } put_name( Task_name[ task_index ], FALSE ); print_time( " - rtems_clock_get - ", &time, "\n" ); -- cgit v1.2.3