Changeset 1d7a927 in rtems


Ignore:
Timestamp:
Oct 2, 2008, 9:01:58 PM (11 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
12a0a525
Parents:
2cc1b43
Message:

2008-10-02 Joel Sherrill <joel.sherrill@…>

  • include/timesys.h: Use inttypes.h.
  • tmck/task1.c: Use uint32_t for count.
Location:
testsuites/tmtests
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • testsuites/tmtests/ChangeLog

    r2cc1b43 r1d7a927  
     12008-10-02      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * include/timesys.h: Use inttypes.h.
     4        * tmck/task1.c: Use uint32_t for count.
     5
    162008-09-17      Joel Sherrill <joel.sherrill@oarcorp.com>
    27
  • testsuites/tmtests/include/timesys.h

    r2cc1b43 r1d7a927  
    1515
    1616#include <tmacros.h>
     17#include <inttypes.h>
    1718
    1819/*
     
    3738                  _iterations, _loop_overhead, _overhead ) \
    3839    printf( \
    39       "%s %d\n", \
     40      "%s %" PRId32 "\n", \
    4041      (_message), \
    4142      (((_total_time) - (_loop_overhead)) / (_iterations)) - (_overhead) \
  • testsuites/tmtests/tmck/task1.c

    r2cc1b43 r1d7a927  
    1515#include "system.h"
    1616
    17 #define MAXIMUM_DISTRIBUTION 10000
     17#define MAXIMUM_DISTRIBUTION 1000
    1818
    1919#undef OPERATION_COUNT
    2020#define OPERATION_COUNT    100000
    2121
    22 int Distribution[ MAXIMUM_DISTRIBUTION + 1 ];
     22uint32_t Distribution[ MAXIMUM_DISTRIBUTION + 1 ];
    2323
    2424rtems_task Task_1(
     
    173173    time += (Distribution[ index ] * index);
    174174    if ( Distribution[ index ] != 0 )
    175       printf( "%d %d\n", index, Distribution[ index ] );
     175      printf( "%" PRId32 " %" PRId32 "\n", index, Distribution[ index ] );
    176176  }
    177   printf( "Total time = %d\n", time );
    178   printf( "Average time = %d\n", time / OPERATION_COUNT );
     177  printf( "Total time = %" PRId32 "\n", time );
     178  printf( "Average time = %" PRId32 "\n", time / OPERATION_COUNT );
    179179}
Note: See TracChangeset for help on using the changeset viewer.