File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed
Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change 66#include "ticks.h"
77
88#ifdef __x86_64__
9- UINT64 ticks_read (void ) {
9+ static UINT64 ticks_read (void ) {
1010 UINT64 a , d ;
1111 __asm__ volatile ("rdtsc" : "=a" (a ), "=d" (d ));
1212 return (d << 32 ) | a ;
1313}
1414#elif defined(__i386__ )
15- UINT64 ticks_read (void ) {
15+ static UINT64 ticks_read (void ) {
1616 UINT64 val ;
1717 __asm__ volatile ("rdtsc" : "=A" (val ));
1818 return val ;
1919}
2020#elif defined(__aarch64__ )
21- UINT64 ticks_read (void ) {
21+ static UINT64 ticks_read (void ) {
2222 UINT64 val ;
2323 __asm__ volatile ("mrs %0, cntpct_el0" : "=r" (val ));
2424 return val ;
2525}
2626#else
27- UINT64 ticks_read (void ) {
27+ static UINT64 ticks_read (void ) {
2828 UINT64 val = 1 ;
2929 return val ;
3030}
3131#endif
3232
3333#if defined(__aarch64__ )
34- UINT64 ticks_freq (void ) {
34+ static UINT64 ticks_freq (void ) {
3535 UINT64 freq ;
3636 __asm__ volatile ("mrs %0, cntfrq_el0" : "=r" (freq ));
3737 return freq ;
3838}
3939#else
4040/* count TSC ticks during a millisecond delay */
41- UINT64 ticks_freq (void ) {
41+ static UINT64 ticks_freq (void ) {
4242 UINT64 ticks_start , ticks_end ;
4343
4444 ticks_start = ticks_read ();
Original file line number Diff line number Diff line change 44#include <efi.h>
55#include <efilib.h>
66
7- UINT64 ticks_read (void );
8- UINT64 ticks_freq (void );
97UINT64 time_usec (void );
You can’t perform that action at this time.
0 commit comments