forked from Imagelibrary/rtems
2008-10-02 Joel Sherrill <joel.sherrill@oarcorp.com>
* include/timesys.h: Use inttypes.h. * tmck/task1.c: Use uint32_t for count.
This commit is contained in:
@@ -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>
|
2008-09-17 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||||
|
|
||||||
* include/timesys.h: Rename STACK_CHECKER_ON to more appropriate
|
* include/timesys.h: Rename STACK_CHECKER_ON to more appropriate
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <tmacros.h>
|
#include <tmacros.h>
|
||||||
|
#include <inttypes.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This constant determines the maximum number of a resource
|
* This constant determines the maximum number of a resource
|
||||||
@@ -36,7 +37,7 @@
|
|||||||
#define put_time( _message, _total_time, \
|
#define put_time( _message, _total_time, \
|
||||||
_iterations, _loop_overhead, _overhead ) \
|
_iterations, _loop_overhead, _overhead ) \
|
||||||
printf( \
|
printf( \
|
||||||
"%s %d\n", \
|
"%s %" PRId32 "\n", \
|
||||||
(_message), \
|
(_message), \
|
||||||
(((_total_time) - (_loop_overhead)) / (_iterations)) - (_overhead) \
|
(((_total_time) - (_loop_overhead)) / (_iterations)) - (_overhead) \
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -14,12 +14,12 @@
|
|||||||
#define CONFIGURE_INIT
|
#define CONFIGURE_INIT
|
||||||
#include "system.h"
|
#include "system.h"
|
||||||
|
|
||||||
#define MAXIMUM_DISTRIBUTION 10000
|
#define MAXIMUM_DISTRIBUTION 1000
|
||||||
|
|
||||||
#undef OPERATION_COUNT
|
#undef OPERATION_COUNT
|
||||||
#define OPERATION_COUNT 100000
|
#define OPERATION_COUNT 100000
|
||||||
|
|
||||||
int Distribution[ MAXIMUM_DISTRIBUTION + 1 ];
|
uint32_t Distribution[ MAXIMUM_DISTRIBUTION + 1 ];
|
||||||
|
|
||||||
rtems_task Task_1(
|
rtems_task Task_1(
|
||||||
rtems_task_argument argument
|
rtems_task_argument argument
|
||||||
@@ -172,8 +172,8 @@ void check_read_timer()
|
|||||||
for ( index = 0 ; index <= MAXIMUM_DISTRIBUTION ; index++ ) {
|
for ( index = 0 ; index <= MAXIMUM_DISTRIBUTION ; index++ ) {
|
||||||
time += (Distribution[ index ] * index);
|
time += (Distribution[ index ] * index);
|
||||||
if ( Distribution[ index ] != 0 )
|
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( "Total time = %" PRId32 "\n", time );
|
||||||
printf( "Average time = %d\n", time / OPERATION_COUNT );
|
printf( "Average time = %" PRId32 "\n", time / OPERATION_COUNT );
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user