5
Last change
on this file since c59479f was
8fbe2e6,
checked in by Joel Sherrill <joel.sherrill@…>, on 09/04/14 at 13:59:49
|
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.
|
-
Property mode set to
100644
|
File size:
1.1 KB
|
Line | |
---|
1 | /* |
---|
2 | * COPYRIGHT (c) 1989-2010. |
---|
3 | * On-Line Applications Research Corporation (OAR). |
---|
4 | * |
---|
5 | * The license and distribution terms for this file may be |
---|
6 | * found in the file LICENSE in this distribution or at |
---|
7 | * http://www.rtems.org/license/LICENSE. |
---|
8 | */ |
---|
9 | |
---|
10 | #ifdef HAVE_CONFIG_H |
---|
11 | #include "config.h" |
---|
12 | #endif |
---|
13 | |
---|
14 | #include <bsp.h> |
---|
15 | #include <rtems/btimer.h> |
---|
16 | #include "test_support.h" |
---|
17 | #include "timesys.h" |
---|
18 | #include "tmtests_empty_function.h" |
---|
19 | |
---|
20 | void rtems_time_test_measure_operation( |
---|
21 | const char *description, |
---|
22 | rtems_time_test_method_t operation, |
---|
23 | void *argument, |
---|
24 | int iterations, |
---|
25 | int overhead |
---|
26 | ) |
---|
27 | { |
---|
28 | int i; |
---|
29 | uint32_t loop_overhead; |
---|
30 | uint32_t end_time; |
---|
31 | |
---|
32 | benchmark_timer_initialize(); |
---|
33 | for (i=0 ; i<iterations ; i++ ) { |
---|
34 | benchmark_timer_empty_operation( i, argument ); |
---|
35 | } |
---|
36 | loop_overhead = benchmark_timer_read(); |
---|
37 | |
---|
38 | benchmark_timer_initialize(); |
---|
39 | for (i=0 ; i<iterations ; i++ ) { |
---|
40 | (*operation)( i, argument ); |
---|
41 | } |
---|
42 | end_time = benchmark_timer_read(); |
---|
43 | |
---|
44 | put_time( |
---|
45 | description, |
---|
46 | end_time, |
---|
47 | iterations, |
---|
48 | loop_overhead, |
---|
49 | overhead |
---|
50 | ); |
---|
51 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.