Changeset 19b2223 in rtems


Ignore:
Timestamp:
Aug 31, 2008, 5:05:19 PM (11 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.9, master
Children:
18bfc42
Parents:
6427f1a
Message:

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

  • sh7032/timer/timer.c, sh7045/timer/timer.c, sh7750/timer/timer.c: Rename timer driver methods to follow RTEMS programming conventions.
Location:
c/src/lib/libcpu/sh
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libcpu/sh/ChangeLog

    r6427f1a r19b2223  
     12008-08-31      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * sh7032/timer/timer.c, sh7045/timer/timer.c, sh7750/timer/timer.c:
     4        Rename timer driver methods to follow RTEMS programming conventions.
     5
    162008-08-19      Ralf Corsépius <ralf.corsepius@rtems.org>
    27
  • c/src/lib/libcpu/sh/sh7032/timer/timer.c

    r6427f1a r19b2223  
    44 *  This file manages the benchmark timer used by the RTEMS Timing Test
    55 *  Suite.  Each measured time period is demarcated by calls to
    6  *  Timer_initialize() and Read_timer().  Read_timer() usually returns
    7  *  the number of microseconds since Timer_initialize() exitted.
     6 *  benchmark_timer_initialize() and benchmark_timer_read().  benchmark_timer_read() usually returns
     7 *  the number of microseconds since benchmark_timer_initialize() exitted.
    88 *
    99 *  NOTE: It is important that the timer start/stop overhead be
     
    6969static uint32_t   Timer_interrupts;
    7070
    71 rtems_boolean Timer_driver_Find_average_overhead;
     71rtems_boolean benchmark_timer_find_average_overhead;
    7272
    7373static uint32_t   Timer_HZ ;
    7474
    75 void Timer_initialize( void )
     75void benchmark_timer_initialize( void )
    7676{
    7777  uint8_t                temp8;
     
    136136
    137137/*
    138  *  The following controls the behavior of Read_timer().
     138 *  The following controls the behavior of benchmark_timer_read().
    139139 *
    140140 *  AVG_OVERHEAD is the overhead for starting and stopping the timer.  It
     
    150150#define LEAST_VALID       0 /* 20 */ /* Don't trust a clicks value lower than this */
    151151
    152 int Read_timer( void )
     152int benchmark_timer_read( void )
    153153{
    154154  uint32_t   cclicks;
     
    169169  total = cclicks + Timer_interrupts * 65536;
    170170
    171   if ( Timer_driver_Find_average_overhead )
     171  if ( benchmark_timer_find_average_overhead )
    172172    return total / CLOCK_SCALE;          /* in XXX microsecond units */
    173173  else
     
    182182}
    183183
    184 /*
    185  *  Empty function call used in loops to measure basic cost of looping
    186  *  in Timing Test Suite.
    187  */
    188 
    189 rtems_status_code Empty_function( void )
    190 {
    191   return RTEMS_SUCCESSFUL;
    192 }
    193 
    194 void Set_find_average_overhead(
     184void benchmark_timer_disable_subtracting_average_overhead(
    195185  rtems_boolean find_flag
    196186)
    197187{
    198   Timer_driver_Find_average_overhead = find_flag;
     188  benchmark_timer_find_average_overhead = find_flag;
    199189}
    200190
  • c/src/lib/libcpu/sh/sh7045/timer/timer.c

    r6427f1a r19b2223  
    44 *  This file manages the benchmark timer used by the RTEMS Timing Test
    55 *  Suite.  Each measured time period is demarcated by calls to
    6  *  Timer_initialize() and Read_timer().  Read_timer() usually returns
    7  *  the number of microseconds since Timer_initialize() exitted.
     6 *  benchmark_timer_initialize() and benchmark_timer_read().  benchmark_timer_read() usually returns
     7 *  the number of microseconds since benchmark_timer_initialize() exitted.
    88 *
    99 *  NOTE: It is important that the timer start/stop overhead be
     
    6060static uint32_t   Timer_interrupts;
    6161
    62 rtems_boolean Timer_driver_Find_average_overhead;
     62rtems_boolean benchmark_timer_find_average_overhead;
    6363
    6464static uint32_t   Timer_MHZ ;
    6565
    66 void Timer_initialize( void )
     66void benchmark_timer_initialize( void )
    6767{
    6868  uint8_t                temp8;
     
    132132
    133133/*
    134  *  The following controls the behavior of Read_timer().
     134 *  The following controls the behavior of benchmark_timer_read().
    135135 *
    136136 *  AVG_OVERHEAD is the overhead for starting and stopping the timer.  It
     
    146146#define LEAST_VALID       0 /* 20 */ /* Don't trust a clicks value lower than this */
    147147
    148 int Read_timer( void )
     148int benchmark_timer_read( void )
    149149{
    150150  uint32_t   clicks;
     
    165165  total = clicks + Timer_interrupts * 65536;
    166166
    167   if ( Timer_driver_Find_average_overhead )
     167  if ( benchmark_timer_find_average_overhead )
    168168    return total / SCALE;          /* in XXX microsecond units */
    169169  else
     
    178178}
    179179
    180 /*
    181  *  Empty function call used in loops to measure basic cost of looping
    182  *  in Timing Test Suite.
    183  */
    184 
    185 rtems_status_code Empty_function( void )
    186 {
    187   return RTEMS_SUCCESSFUL;
    188 }
    189 
    190 void Set_find_average_overhead(
     180void benchmark_timer_disable_subtracting_average_overhead(
    191181  rtems_boolean find_flag
    192182)
    193183{
    194   Timer_driver_Find_average_overhead = find_flag;
     184  benchmark_timer_find_average_overhead = find_flag;
    195185}
    196186
  • c/src/lib/libcpu/sh/sh7750/timer/timer.c

    r6427f1a r19b2223  
    44 *  This file manages the benchmark timer used by the RTEMS Timing Test
    55 *  Suite.  Each measured time period is demarcated by calls to
    6  *  Timer_initialize() and Read_timer().  Read_timer() usually returns
    7  *  the number of microseconds since Timer_initialize() exitted.
     6 *  benchmark_timer_initialize() and benchmark_timer_read().  benchmark_timer_read() usually returns
     7 *  the number of microseconds since benchmark_timer_initialize() exitted.
    88 *
    99 *  NOTE: It is important that the timer start/stop overhead be
     
    5050static uint32_t   microseconds_per_int;
    5151
    52 rtems_boolean Timer_driver_Find_average_overhead;
    53 
    54 /* Timer_initialize --
     52rtems_boolean benchmark_timer_find_average_overhead;
     53
     54/* benchmark_timer_initialize --
    5555 *     Initialize Timer 1 to operate as a RTEMS benchmark timer:
    5656 *        - determine timer clock frequency
     
    6666 */
    6767void
    68 Timer_initialize(void)
     68benchmark_timer_initialize(void)
    6969{
    7070    uint8_t               temp8;
     
    178178
    179179/*
    180  *  The following controls the behavior of Read_timer().
     180 *  The following controls the behavior of benchmark_timer_read().
    181181 *
    182182 *  AVG_OVERHEAD is the overhead for starting and stopping the timer.  It
     
    192192#define LEAST_VALID       0 /* 20 */ /* Don't trust a clicks value lower than this */
    193193
    194 /* Read_timer --
     194/* benchmark_timer_read --
    195195 *     Read timer value in microsecond units since timer start.
    196196 *
     
    202202 */
    203203int
    204 Read_timer(void)
     204benchmark_timer_read(void)
    205205{
    206206    uint32_t              clicks;
     
    227227    total = microseconds_per_int * ints + (clicks / microseconds_divider);
    228228
    229     if ( Timer_driver_Find_average_overhead )
     229    if ( benchmark_timer_find_average_overhead )
    230230        return total;          /* in microsecond units */
    231231    else
     
    240240}
    241241
    242 /* Empty_function --
    243  *     Empty function call used in loops to measure basic cost of looping
    244  *     in Timing Test Suite.
    245  *
    246  * PARAMETERS:
    247  *     none
    248  *
    249  * RETURNS:
    250  *     RTEMS_SUCCESSFUL
    251  */
    252 rtems_status_code
    253 Empty_function( void )
    254 {
    255   return RTEMS_SUCCESSFUL;
    256 }
    257 
    258 /* Set_find_average_overhead --
     242/* benchmark_timer_disable_subtracting_average_overhead --
    259243 *     This routine is invoked by the "Check Timer" (tmck) test in the
    260  *     RTEMS Timing Test Suite. It makes the Read_timer routine not
     244 *     RTEMS Timing Test Suite. It makes the benchmark_timer_read routine not
    261245 *     subtract the overhead required to initialize and read the benchmark
    262246 *     timer.
     
    269253 */
    270254void
    271 Set_find_average_overhead(rtems_boolean find_flag)
    272 {
    273     Timer_driver_Find_average_overhead = find_flag;
     255benchmark_timer_disable_subtracting_average_overhead(rtems_boolean find_flag)
     256{
     257    benchmark_timer_find_average_overhead = find_flag;
    274258}
    275259
Note: See TracChangeset for help on using the changeset viewer.