summaryrefslogtreecommitdiffstats
path: root/testsuites
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-10-02 21:01:58 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-10-02 21:01:58 +0000
commit1d7a927dc43b0d7af43799fd45551d74cb0e5bd7 (patch)
tree853a37d415357d3813eb236ac8459e45aa531b8f /testsuites
parent2008-10-02 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-1d7a927dc43b0d7af43799fd45551d74cb0e5bd7.tar.bz2
2008-10-02 Joel Sherrill <joel.sherrill@oarcorp.com>
* include/timesys.h: Use inttypes.h. * tmck/task1.c: Use uint32_t for count.
Diffstat (limited to 'testsuites')
-rw-r--r--testsuites/tmtests/ChangeLog5
-rw-r--r--testsuites/tmtests/include/timesys.h3
-rw-r--r--testsuites/tmtests/tmck/task1.c10
3 files changed, 12 insertions, 6 deletions
diff --git a/testsuites/tmtests/ChangeLog b/testsuites/tmtests/ChangeLog
index 1feb0388cd..b3b676e3d7 100644
--- a/testsuites/tmtests/ChangeLog
+++ b/testsuites/tmtests/ChangeLog
@@ -1,3 +1,8 @@
+2008-10-02 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * include/timesys.h: Use inttypes.h.
+ * tmck/task1.c: Use uint32_t for count.
+
2008-09-17 Joel Sherrill <joel.sherrill@oarcorp.com>
* include/timesys.h: Rename STACK_CHECKER_ON to more appropriate
diff --git a/testsuites/tmtests/include/timesys.h b/testsuites/tmtests/include/timesys.h
index 38d15ff518..fc29cccccd 100644
--- a/testsuites/tmtests/include/timesys.h
+++ b/testsuites/tmtests/include/timesys.h
@@ -14,6 +14,7 @@
*/
#include <tmacros.h>
+#include <inttypes.h>
/*
* This constant determines the maximum number of a resource
@@ -36,7 +37,7 @@
#define put_time( _message, _total_time, \
_iterations, _loop_overhead, _overhead ) \
printf( \
- "%s %d\n", \
+ "%s %" PRId32 "\n", \
(_message), \
(((_total_time) - (_loop_overhead)) / (_iterations)) - (_overhead) \
)
diff --git a/testsuites/tmtests/tmck/task1.c b/testsuites/tmtests/tmck/task1.c
index 9e46732f4f..8324289388 100644
--- a/testsuites/tmtests/tmck/task1.c
+++ b/testsuites/tmtests/tmck/task1.c
@@ -14,12 +14,12 @@
#define CONFIGURE_INIT
#include "system.h"
-#define MAXIMUM_DISTRIBUTION 10000
+#define MAXIMUM_DISTRIBUTION 1000
#undef OPERATION_COUNT
#define OPERATION_COUNT 100000
-int Distribution[ MAXIMUM_DISTRIBUTION + 1 ];
+uint32_t Distribution[ MAXIMUM_DISTRIBUTION + 1 ];
rtems_task Task_1(
rtems_task_argument argument
@@ -172,8 +172,8 @@ void check_read_timer()
for ( index = 0 ; index <= MAXIMUM_DISTRIBUTION ; index++ ) {
time += (Distribution[ index ] * index);
if ( Distribution[ index ] != 0 )
- printf( "%d %d\n", index, Distribution[ index ] );
+ printf( "%" PRId32 " %" PRId32 "\n", index, Distribution[ index ] );
}
- printf( "Total time = %d\n", time );
- printf( "Average time = %d\n", time / OPERATION_COUNT );
+ printf( "Total time = %" PRId32 "\n", time );
+ printf( "Average time = %" PRId32 "\n", time / OPERATION_COUNT );
}