summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-08-31 16:59:49 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-08-31 16:59:49 +0000
commita903b7beffd3df0de9f412e966d30db5c856021a (patch)
tree0e2a533e2f39d387a49210a63104bdfa905e3d72
parent2008-08-31 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-a903b7beffd3df0de9f412e966d30db5c856021a.tar.bz2
2008-08-31 Joel Sherrill <joel.sherrill@oarcorp.com>
* timer/timer.c: Rename timer driver methods to follow RTEMS programming conventions.
-rw-r--r--c/src/lib/libcpu/mips/ChangeLog5
-rw-r--r--c/src/lib/libcpu/mips/timer/timer.c28
2 files changed, 14 insertions, 19 deletions
diff --git a/c/src/lib/libcpu/mips/ChangeLog b/c/src/lib/libcpu/mips/ChangeLog
index 2c6e285229..dfb67dbc38 100644
--- a/c/src/lib/libcpu/mips/ChangeLog
+++ b/c/src/lib/libcpu/mips/ChangeLog
@@ -1,3 +1,8 @@
+2008-08-31 Joel Sherrill <joel.sherrill@oarcorp.com>
+
+ * timer/timer.c: Rename timer driver methods to follow RTEMS
+ programming conventions.
+
2007-11-26 Joel Sherrill <joel.sherrill@oarcorp.com>
* clock/ckinit.c: Eliminate the clicks_per_microsecond field in the
diff --git a/c/src/lib/libcpu/mips/timer/timer.c b/c/src/lib/libcpu/mips/timer/timer.c
index 0db65238eb..86b45ce9cb 100644
--- a/c/src/lib/libcpu/mips/timer/timer.c
+++ b/c/src/lib/libcpu/mips/timer/timer.c
@@ -21,8 +21,8 @@
*
* This file manages the benchmark timer used by the RTEMS Timing Test
* Suite. Each measured time period is demarcated by calls to
- * Timer_initialize() and Read_timer(). Read_timer() usually returns
- * the number of microseconds since Timer_initialize() exitted.
+ * benchmark_timer_initialize() and benchmark_timer_read(). benchmark_timer_read() usually returns
+ * the number of microseconds since benchmark_timer_initialize() exitted.
*
* NOTE: It is important that the timer start/stop overhead be
* determined when porting or modifying this code.
@@ -52,10 +52,10 @@
extern uint32_t mips_read_timer( void );
-static rtems_boolean Timer_driver_Find_average_overhead;
+static rtems_boolean benchmark_timer_find_average_overhead;
static uint32_t Timer_initial_value = 0;
-void Timer_initialize( void )
+void benchmark_timer_initialize( void )
{
Timer_initial_value = mips_read_timer();
/*
@@ -66,7 +66,7 @@ void Timer_initialize( void )
}
/*
- * The following controls the behavior of Read_timer().
+ * The following controls the behavior of benchmark_timer_read().
*
* AVG_OVEREHAD is the overhead for starting and stopping the timer. It
* is usually deducted from the number returned.
@@ -80,7 +80,7 @@ void Timer_initialize( void )
/* This value is in cycles. */
#define LEAST_VALID 1 /* Don't trust a clicks value lower than this */
-int Read_timer( void )
+int benchmark_timer_read( void )
{
uint64_t clicks;
uint32_t total;
@@ -107,7 +107,7 @@ int Read_timer( void )
total = clicks;
#endif
- if ( Timer_driver_Find_average_overhead == 1 )
+ if ( benchmark_timer_find_average_overhead == 1 )
return total; /* in # cycles units */
else {
if ( total < LEAST_VALID )
@@ -119,19 +119,9 @@ int Read_timer( void )
}
}
-/*
- * Empty function call used in loops to measure basic cost of looping
- * in Timing Test Suite.
- */
-
-rtems_status_code Empty_function( void )
-{
- return RTEMS_SUCCESSFUL;
-}
-
-void Set_find_average_overhead(
+void benchmark_timer_disable_subtracting_average_overhead(
rtems_boolean find_flag
)
{
- Timer_driver_Find_average_overhead = find_flag;
+ benchmark_timer_find_average_overhead = find_flag;
}