summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libcpu/arm/mc9328mxl/timer/timer.c
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/lib/libcpu/arm/mc9328mxl/timer/timer.c')
-rw-r--r--c/src/lib/libcpu/arm/mc9328mxl/timer/timer.c28
1 files changed, 9 insertions, 19 deletions
diff --git a/c/src/lib/libcpu/arm/mc9328mxl/timer/timer.c b/c/src/lib/libcpu/arm/mc9328mxl/timer/timer.c
index 02c38d2ca6..6403e43a6e 100644
--- a/c/src/lib/libcpu/arm/mc9328mxl/timer/timer.c
+++ b/c/src/lib/libcpu/arm/mc9328mxl/timer/timer.c
@@ -14,8 +14,8 @@
* Notes:
* This file manages the benchmark timer used by the RTEMS Timing Test
* Suite. Each measured time period is demarcated by calls to
- * benchmark_timerinitialize() and benchmark_timerread(). benchmark_timerread() usually returns
- * the number of microseconds since benchmark_timerinitialize() exitted.
+ * benchmark_timer_initialize() and benchmark_timer_read(). benchmark_timer_read() usually returns
+ * the number of microseconds since benchmark_timer_initialize() exitted.
*
* It is important that the timer start/stop overhead be determined
* when porting or modifying this code.
@@ -30,13 +30,13 @@
uint32_t g_start;
uint32_t g_freq;
-rtems_boolean benchmark_timerfind_average_overhead;
+rtems_boolean benchmark_timer_find_average_overhead;
/*
* Set up Timer 1
*/
-void benchmark_timerinitialize( void )
+void benchmark_timer_initialize( void )
{
MC9328MXL_TMR2_TCTL = (MC9328MXL_TMR_TCTL_CLKSRC_PCLK1 |
MC9328MXL_TMR_TCTL_FRR |
@@ -51,7 +51,7 @@ void benchmark_timerinitialize( void )
}
/*
- * The following controls the behavior of benchmark_timerread().
+ * 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.
@@ -65,7 +65,7 @@ void benchmark_timerinitialize( void )
/* This value is in microseconds. */
#define LEAST_VALID 1 /* Don't trust a clicks value lower than this */
-int benchmark_timerread( void )
+int benchmark_timer_read( void )
{
uint32_t t;
unsigned long long total;
@@ -82,7 +82,7 @@ int benchmark_timerread( void )
/* convert to nanoseconds */
total = (total * 1000)/ g_freq;
- if ( benchmark_timerfind_average_overhead == 1 ) {
+ if ( benchmark_timer_find_average_overhead == 1 ) {
return (int) total;
} else if ( total < LEAST_VALID ) {
return 0;
@@ -94,20 +94,10 @@ int benchmark_timerread( void )
return (total - AVG_OVERHEAD);
}
-/*
- * Empty function call used in loops to measure basic cost of looping
- * in Timing Test Suite.
- */
-
-rtems_status_code benchmark_timerempty_function( void )
-{
- return RTEMS_SUCCESSFUL;
-}
-
-void benchmark_timerdisable_subtracting_average_overhead(
+void benchmark_timer_disable_subtracting_average_overhead(
rtems_boolean find_flag
)
{
- benchmark_timerfind_average_overhead = find_flag;
+ benchmark_timer_find_average_overhead = find_flag;
}