Changeset 89866d84 in rtems


Ignore:
Timestamp:
Aug 31, 2008, 5:24:32 PM (11 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.9, master
Children:
39c1a1af
Parents:
e0c13fa
Message:

2008-08-31 Joel Sherrill <joel.sherrill@…>

  • timer/timer.c: Eliminate empty function from every benchmark timer driver. Fix spelling.
Location:
c/src/lib/libbsp/arm
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/arm/edb7312/ChangeLog

    re0c13fa r89866d84  
     12008-08-31      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * timer/timer.c: Eliminate empty function from every benchmark timer
     4        driver. Fix spelling.
     5
    162008-08-31      Joel Sherrill <joel.sherrill@oarcorp.com>
    27
  • c/src/lib/libbsp/arm/edb7312/timer/timer.c

    re0c13fa r89866d84  
    1212 *  This file manages the benchmark timer used by the RTEMS Timing Test
    1313 *  Suite.  Each measured time period is demarcated by calls to
    14  *  benchmark_timerinitialize() and benchmark_timerread().  benchmark_timerread() usually returns
    15  *  the number of microseconds since benchmark_timerinitialize() exitted.
     14 *  benchmark_timer_initialize() and benchmark_timer_read().  benchmark_timer_read() usually returns
     15 *  the number of microseconds since benchmark_timer_initialize() exitted.
    1616 *
    1717 *  It is important that the timer start/stop overhead be determined
     
    2626
    2727uint16_t         tstart;
    28 bool benchmark_timerfind_average_overhead;
     28bool benchmark_timer_find_average_overhead;
    2929
    30 void benchmark_timerinitialize( void )
     30void benchmark_timer_initialize( void )
    3131{
    3232    *EP7312_SYSCON1 |= EP7312_SYSCON1_TC2_512KHZ;
     
    3535
    3636/*
    37  *  The following controls the behavior of benchmark_timerread().
     37 *  The following controls the behavior of benchmark_timer_read().
    3838 *
    3939 *  AVG_OVEREHAD is the overhead for starting and stopping the timer.  It
     
    4949#define LEAST_VALID       1  /* Don't trust a clicks value lower than this */
    5050
    51 int benchmark_timerread( void )
     51int benchmark_timer_read( void )
    5252{
    5353  uint16_t         t;
     
    6363  total = (uint32_t)0x0000ffff - t;  /* result is 1/512000 = ~2 uS */
    6464  total = (total * 1953) / 1000;   /* convert to uS */
    65   if ( benchmark_timerfind_average_overhead == 1 )
     65  if ( benchmark_timer_find_average_overhead == 1 )
    6666    return total;          /* in XXX microsecond units */
    6767  else {
     
    7575}
    7676
    77 /*
    78  *  Empty function call used in loops to measure basic cost of looping
    79  *  in Timing Test Suite.
    80  */
    81 
    82 rtems_status_code benchmark_timerempty_function( void )
    83 {
    84   return RTEMS_SUCCESSFUL;
    85 }
    86 
    87 void benchmark_timerdisable_subtracting_average_overhead(
     77void benchmark_timer_disable_subtracting_average_overhead(
    8878  bool find_flag
    8979)
    9080{
    91   benchmark_timerfind_average_overhead = find_flag;
     81  benchmark_timer_find_average_overhead = find_flag;
    9282}
  • c/src/lib/libbsp/arm/gba/ChangeLog

    re0c13fa r89866d84  
     12008-08-31      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * timer/timer.c: Eliminate empty function from every benchmark timer
     4        driver. Fix spelling.
     5
    162008-08-31      Joel Sherrill <joel.sherrill@oarcorp.com>
    27
  • c/src/lib/libbsp/arm/gba/timer/timer.c

    re0c13fa r89866d84  
    1919 *  This file manages the benchmark timer used by the RTEMS Timing Test
    2020 *  Suite.  Each measured time period is demarcated by calls to
    21  *  benchmark_timerinitialize() and benchmark_timerread().  benchmark_timerread() usually returns
    22  *  the number of microseconds since benchmark_timerinitialize() exitted.
     21 *  benchmark_timer_initialize() and benchmark_timer_read().  benchmark_timer_read() usually returns
     22 *  the number of microseconds since benchmark_timer_initialize() exitted.
    2323 *
    2424 *  It is important that the timer start/stop overhead be determined
     
    5656#endif
    5757
    58 bool benchmark_timerfind_average_overhead;
     58bool benchmark_timer_find_average_overhead;
    5959
    6060/**
    61  *  @brief benchmark_timerinitialize start TM0 and TM1
     61 *  @brief benchmark_timer_initialize start TM0 and TM1
    6262 *
    6363 *  @param  None
    6464 *  @return None
    6565 */
    66 void benchmark_timerinitialize( void )
     66void benchmark_timer_initialize( void )
    6767{
    6868  GBA_REG_TM1CNT =  0x0000;                /* Stop Counters         */
     
    7676
    7777/*
    78  *  The following controls the behavior of benchmark_timerread().
     78 *  The following controls the behavior of benchmark_timer_read().
    7979 *
    8080 *  AVG_OVEREHAD is the overhead for starting and stopping the timer.  It
     
    8989
    9090/**
    91  *  @brief benchmark_timerread return timer countervalue in microseconds.
     91 *  @brief benchmark_timer_read return timer countervalue in microseconds.
    9292 *
    9393 *  Used in Timing Test Suite.
     
    9696 *  @return Timer value in microseconds
    9797 */
    98 uint32_t benchmark_timerread( void )
     98uint32_t benchmark_timer_read( void )
    9999{
    100100  uint32_t  ticks;
     
    111111  /* convert to uS */
    112112  total = ((ticks * __TickTime_ns) / 1000);
    113   if ( benchmark_timerfind_average_overhead == 1 ) {
     113  if ( benchmark_timer_find_average_overhead == 1 ) {
    114114      return total;          /* in microseconds */
    115115  }
     
    123123
    124124/**
    125  *  @brief Empty function
    126  *
    127  *  Empty function call used in loops to measure basic cost of looping
    128  *  in Timing Test Suite.
    129  *
    130  *  @param  None
    131  *  @return RTEMS_SUCCESSFUL
    132 */
    133 rtems_status_code benchmark_timerempty_function( void )
    134 {
    135    return RTEMS_SUCCESSFUL;
    136 }
    137 
    138 /**
    139  *  @brief Set benchmark_timerfind_average_overhead flag.
     125 *  @brief Set benchmark_timer_find_average_overhead flag.
    140126 *
    141127 *  Used in Timing Test Suite.
     
    144130 *  @return None
    145131*/
    146 void benchmark_timerdisable_subtracting_average_overhead(bool find_flag)
     132void benchmark_timer_disable_subtracting_average_overhead(bool find_flag)
    147133{
    148    benchmark_timerfind_average_overhead = find_flag;
     134   benchmark_timer_find_average_overhead = find_flag;
    149135}
Note: See TracChangeset for help on using the changeset viewer.