From 4562dd8789617f8976b712cad375a8f715b33d97 Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Fri, 30 Sep 2011 02:53:32 +0000 Subject: =?UTF-8?q?2011-09-30=09Ralf=20Cors=C3=A9pius=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * psx01/init.c, psx07/init.c, psx09/init.c, psx12/init.c, psxclock/init.c, psxtimer01/psxtimer.c: Include "pritime.h". Use PRIdtime_t to print time_t. --- testsuites/psxtests/ChangeLog | 6 ++++++ testsuites/psxtests/psx01/init.c | 8 +++++--- testsuites/psxtests/psx07/init.c | 5 +++-- testsuites/psxtests/psx09/init.c | 5 +++-- testsuites/psxtests/psx12/init.c | 5 +++-- testsuites/psxtests/psxclock/init.c | 10 ++++++---- testsuites/psxtests/psxtimer01/psxtimer.c | 5 +++-- 7 files changed, 29 insertions(+), 15 deletions(-) (limited to 'testsuites') diff --git a/testsuites/psxtests/ChangeLog b/testsuites/psxtests/ChangeLog index 72de20dfdc..5e78a0a079 100644 --- a/testsuites/psxtests/ChangeLog +++ b/testsuites/psxtests/ChangeLog @@ -1,3 +1,9 @@ +2011-09-30 Ralf Corsépius + + * psx01/init.c, psx07/init.c, psx09/init.c, psx12/init.c, + psxclock/init.c, psxtimer01/psxtimer.c: Include "pritime.h". + Use PRIdtime_t to print time_t. + 2011-09-30 Ralf Corsépius * configure.ac: Check for size of time_t. diff --git a/testsuites/psxtests/psx01/init.c b/testsuites/psxtests/psx01/init.c index c3ce2cf925..40616c3c9e 100644 --- a/testsuites/psxtests/psx01/init.c +++ b/testsuites/psxtests/psx01/init.c @@ -13,11 +13,13 @@ #include "config.h" #endif -#define CONFIGURE_INIT -#include "system.h" #include #include +#define CONFIGURE_INIT +#include "system.h" +#include "pritime.h" + void *POSIX_Init( void *argument ) @@ -87,7 +89,7 @@ void *POSIX_Init( status = sched_rr_get_interval( getpid(), &tr ); printf( - "Init: Round Robin quantum is %ld seconds, %ld nanoseconds\n", + "Init: Round Robin quantum is %" PRIdtime_t " seconds, %ld nanoseconds\n", tr.tv_sec, tr.tv_nsec ); diff --git a/testsuites/psxtests/psx07/init.c b/testsuites/psxtests/psx07/init.c index bc5a95f139..347245b949 100644 --- a/testsuites/psxtests/psx07/init.c +++ b/testsuites/psxtests/psx07/init.c @@ -32,6 +32,7 @@ extern int pthread_attr_setcputime( #include "system.h" #include #include "tmacros.h" +#include "pritime.h" void print_schedparam( char *prefix, @@ -47,10 +48,10 @@ void print_schedparam( #if defined(_POSIX_SPORADIC_SERVER) printf( "%ssched_ss_low_priority = %d\n", prefix, schedparam->sched_ss_low_priority ); - printf( "%ssched_ss_replenish_period = (%ld, %ld)\n", prefix, + printf( "%ssched_ss_replenish_period = (%" PRIdtime_t ", %ld)\n", prefix, schedparam->sched_ss_repl_period.tv_sec, schedparam->sched_ss_repl_period.tv_nsec ); - printf( "%ssched_sched_ss_initial_budget = (%ld, %ld)\n", prefix, + printf( "%ssched_sched_ss_initial_budget = (%" PRIdtime_t ", %ld)\n", prefix, schedparam->sched_ss_init_budget.tv_sec, schedparam->sched_ss_init_budget.tv_nsec ); #else diff --git a/testsuites/psxtests/psx09/init.c b/testsuites/psxtests/psx09/init.c index 787973f7ee..bc7015cb46 100644 --- a/testsuites/psxtests/psx09/init.c +++ b/testsuites/psxtests/psx09/init.c @@ -18,6 +18,7 @@ #define CONFIGURE_INIT #include "system.h" #include +#include "pritime.h" void print_schedparam( char *prefix, @@ -37,10 +38,10 @@ void print_schedparam( #if defined(_POSIX_SPORADIC_SERVER) printf( "%ssched_ss_low_priority = %d\n", prefix, schedparam->sched_ss_low_priority ); - printf( "%ssched_ss_repl_period = (%ld, %ld)\n", prefix, + printf( "%ssched_ss_repl_period = (%" PRIdtime_t ", %ld)\n", prefix, schedparam->sched_ss_repl_period.tv_sec, schedparam->sched_ss_repl_period.tv_nsec ); - printf( "%ssched_ss_init_budget = (%ld, %ld)\n", prefix, + printf( "%ssched_ss_init_budget = (%" PRIdtime_t ", %ld)\n", prefix, schedparam->sched_ss_init_budget.tv_sec, schedparam->sched_ss_init_budget.tv_nsec ); #else diff --git a/testsuites/psxtests/psx12/init.c b/testsuites/psxtests/psx12/init.c index 6674ccd0aa..9606448270 100644 --- a/testsuites/psxtests/psx12/init.c +++ b/testsuites/psxtests/psx12/init.c @@ -18,6 +18,7 @@ #define CONFIGURE_INIT #include "system.h" #include +#include "pritime.h" void print_schedparam( char *prefix, @@ -33,10 +34,10 @@ void print_schedparam( #if defined(_POSIX_SPORADIC_SERVER) printf( "%ssched_ss_low_priority = %d\n", prefix, schedparam->sched_ss_low_priority ); - printf( "%ssched_ss_repl_period = (%ld, %ld)\n", prefix, + printf( "%ssched_ss_repl_period = (%" PRIdtime_t ", %ld)\n", prefix, schedparam->sched_ss_repl_period.tv_sec, schedparam->sched_ss_repl_period.tv_nsec ); - printf( "%ssched_ss_init_budget = (%ld, %ld)\n", prefix, + printf( "%ssched_ss_init_budget = (%" PRIdtime_t ", %ld)\n", prefix, schedparam->sched_ss_init_budget.tv_sec, schedparam->sched_ss_init_budget.tv_nsec ); #else diff --git a/testsuites/psxtests/psxclock/init.c b/testsuites/psxtests/psxclock/init.c index e46fdbaac9..9945bbdd5b 100644 --- a/testsuites/psxtests/psxclock/init.c +++ b/testsuites/psxtests/psxclock/init.c @@ -13,10 +13,12 @@ #include "config.h" #endif -#include #include #include +#include "pmacros.h" +#include "pritime.h" + void check_enosys(int status); void check_enosys(int status) @@ -84,7 +86,7 @@ rtems_task Init( puts( "Init: clock_getres - SUCCESSFUL" ); sc = clock_getres( CLOCK_REALTIME, &tv ); - printf( "Init: resolution = sec (%ld), nsec (%ld)\n", tv.tv_sec, tv.tv_nsec ); + printf( "Init: resolution = sec (%" PRIdtime_t "), nsec (%ld)\n", tv.tv_sec, tv.tv_nsec ); rtems_test_assert( !sc ); /* set the time of day, and print our buffer in multiple ways */ @@ -114,7 +116,7 @@ rtems_task Init( /* print new times to make sure it has changed and we can get the realtime */ sc = clock_gettime( CLOCK_PROCESS_CPUTIME_ID, &tv ); rtems_test_assert( !sc ); - printf("Time since boot: (%" PRItime_t ", %ld)\n", tv.tv_sec,tv.tv_nsec ); + printf("Time since boot: (%" PRIdtime_t ", %ld)\n", tv.tv_sec,tv.tv_nsec ); sc = clock_gettime( CLOCK_REALTIME, &tv ); rtems_test_assert( !sc ); @@ -207,7 +209,7 @@ rtems_task Init( /* check the time remaining */ - printf( "Init: sec (%ld), nsec (%ld) remaining\n", tr.tv_sec, tr.tv_nsec ); + printf( "Init: sec (%" PRIdtime_t "), nsec (%ld) remaining\n", tr.tv_sec, tr.tv_nsec ); rtems_test_assert( !tr.tv_sec && !tr.tv_nsec ); puts( "Init: nanosleep - 1.35 seconds" ); diff --git a/testsuites/psxtests/psxtimer01/psxtimer.c b/testsuites/psxtests/psxtimer01/psxtimer.c index 3b44f780ed..d3f0964735 100644 --- a/testsuites/psxtests/psxtimer01/psxtimer.c +++ b/testsuites/psxtests/psxtimer01/psxtimer.c @@ -35,6 +35,7 @@ #include /* time facilities */ #include /* console facilities */ #include +#include "pritime.h" void StopTimer( timer_t timer_id, @@ -125,7 +126,7 @@ void * task_a (void *arg) rtems_test_exit(0); } printf( - "task A: timer_settime - value=%" PRItime_t ":%ld interval=%" PRItime_t ":%ld\n", + "task A: timer_settime - value=%" PRIdtime_t ":%ld interval=%" PRIdtime_t ":%ld\n", timergetdata.it_value.tv_sec, timergetdata.it_value.tv_nsec, timergetdata.it_interval.tv_sec, timergetdata.it_interval.tv_nsec ); @@ -311,7 +312,7 @@ void * task_c (void *arg) rtems_test_exit(0); } printf( - "task C: timer_gettime - %" PRItime_t ":%ld remaining from %" PRItime_t ":%ld\n", + "task C: timer_gettime - %" PRIdtime_t ":%ld remaining from %" PRIdtime_t ":%ld\n", timergetdata.it_value.tv_sec, timergetdata.it_value.tv_nsec, timergetdata.it_interval.tv_sec, timergetdata.it_interval.tv_nsec ); -- cgit v1.2.3