summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/nios2/nios2_iss/timer/timer.c
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/lib/libbsp/nios2/nios2_iss/timer/timer.c')
-rw-r--r--c/src/lib/libbsp/nios2/nios2_iss/timer/timer.c28
1 files changed, 9 insertions, 19 deletions
diff --git a/c/src/lib/libbsp/nios2/nios2_iss/timer/timer.c b/c/src/lib/libbsp/nios2/nios2_iss/timer/timer.c
index 75588f8421..d51c606e5a 100644
--- a/c/src/lib/libbsp/nios2/nios2_iss/timer/timer.c
+++ b/c/src/lib/libbsp/nios2/nios2_iss/timer/timer.c
@@ -2,8 +2,8 @@
*
* 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.
*
* NOTE: It is important that the timer start/stop overhead be
* determined when porting or modifying this code.
@@ -27,7 +27,7 @@
#include <bsp.h>
volatile uint32_t Timer_interrupts;
-rtems_boolean benchmark_timerfind_average_overhead;
+rtems_boolean benchmark_timer_find_average_overhead;
#define TIMER_REGS ((altera_avalon_timer_regs*)NIOS2_IO_BASE(TIMER_BASE))
@@ -37,7 +37,7 @@ void timerisr( void )
Timer_interrupts++;
}
-void benchmark_timerinitialize( void )
+void benchmark_timer_initialize( void )
{
uint32_t old_ie;
@@ -83,7 +83,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.
@@ -97,7 +97,7 @@ void benchmark_timerinitialize( void )
#define LEAST_VALID AVG_OVERHEAD /* Don't trust a value lower than this */
-int benchmark_timerread( void )
+int benchmark_timer_read( void )
{
uint32_t timer_wraps;
uint32_t timer_snap;
@@ -128,24 +128,14 @@ int benchmark_timerread( void )
if(total < LEAST_VALID) return 0;
- if(benchmark_timerfind_average_overhead != TRUE) total-= AVG_OVERHEAD;
+ if(benchmark_timer_find_average_overhead != TRUE) total-= AVG_OVERHEAD;
return total;
}
-/*
- * 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;
}