From 8fbe2e69b544479feb5a361c6aebeae53eb827c8 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 4 Sep 2014 08:59:49 -0500 Subject: Use correct prototype of benchmark_timer_read() This change starts with removing the effectively empty file timerdrv.h. The prototypes for benchmark_timer_XXX() were in btimer.h which was not universally used. Thus every use of timerdrv.h had to be changed to btimer.h. Then the prototypes for benchmark_timer_read() had to be adjusted to return benchmark_timer_t rather than int or uint32_t. I took this opportunity to also correct the file headers to separate the copyright from the file description comments which is needed to ensure the copyright isn't propagated into Doxygen output. --- c/src/lib/libcpu/mips/timer/timer.c | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) (limited to 'c/src/lib/libcpu/mips') diff --git a/c/src/lib/libcpu/mips/timer/timer.c b/c/src/lib/libcpu/mips/timer/timer.c index 4cb66e3b4c..da5291a48a 100644 --- a/c/src/lib/libcpu/mips/timer/timer.c +++ b/c/src/lib/libcpu/mips/timer/timer.c @@ -1,7 +1,12 @@ -/* timer.c - * - * This file contains the initialization code for the IDT 4650 timer driver. +/** + * @file + * @brief IDT 4650 Timer Driver. * + * This file manages the benchmark timer used by the RTEMS Timing Test + * Suite. + */ + +/* * Author: Craig Lebakken * * COPYRIGHT (c) 1996 by Transition Networks Inc. @@ -19,14 +24,6 @@ * * derived from src/lib/libbsp/no_cpu/no_bsp/timer/timer.c * - * This file manages the benchmark timer used by the RTEMS Timing Test - * Suite. Each measured time period is demarcated by calls to - * 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. - * * COPYRIGHT (c) 1989-1999. * On-Line Applications Research Corporation (OAR). * @@ -35,15 +32,8 @@ * http://www.rtems.org/license/LICENSE. */ -/* - * Rather than deleting this, it is commented out to (hopefully) help - * the submitter send updates. - * - * static char _sccsid[] = "@(#)timer.c 08/20/96 1.5\n"; - */ - - #include +#include #define CLOCKS_PER_MICROSECOND ( CPU_CLOCK_RATE_MHZ ) #define TIMER_MAX_VALUE 0xffffffff @@ -78,7 +68,7 @@ void benchmark_timer_initialize( void ) /* This value is in cycles. */ #define LEAST_VALID 1 /* Don't trust a clicks value lower than this */ -int benchmark_timer_read( void ) +benchmark_timer_t benchmark_timer_read( void ) { uint64_t clicks; uint32_t total; -- cgit v1.2.3