From 68e7f53f05dd80e8b4ab9d84c9931df22a6b060c Mon Sep 17 00:00:00 2001 From: Haru Date: Thu, 10 Jul 2014 16:59:55 +0200 Subject: Fixed reserved __identifier violations - Complies with CERT DCL37-C - Fixes issue #293 (special thanks to elfring) Signed-off-by: Haru --- src/common/timer.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/common/timer.c') diff --git a/src/common/timer.c b/src/common/timer.c index ab0471d51..128fc4daf 100644 --- a/src/common/timer.c +++ b/src/common/timer.c @@ -107,7 +107,7 @@ char* search_timer_func_list(TimerFunc func) #if defined(ENABLE_RDTSC) static uint64 RDTSC_BEGINTICK = 0, RDTSC_CLOCK = 0; -static __inline uint64 _rdtsc(){ +static __inline uint64 rdtsc_() { register union{ uint64 qw; uint32 dw[2]; @@ -127,14 +127,14 @@ static void rdtsc_calibrate(){ RDTSC_CLOCK = 0; for(i = 0; i < 5; i++){ - t1 = _rdtsc(); + t1 = rdtsc_(); usleep(1000000); //1000 MS - t2 = _rdtsc(); + t2 = rdtsc_(); RDTSC_CLOCK += (t2 - t1) / 1000; } RDTSC_CLOCK /= 5; - RDTSC_BEGINTICK = _rdtsc(); + RDTSC_BEGINTICK = rdtsc_(); ShowMessage(" done. (Frequency: %u Mhz)\n", (uint32)(RDTSC_CLOCK/1000) ); } @@ -175,7 +175,7 @@ static int64 sys_tick(void) { #elif defined(ENABLE_RDTSC) // RDTSC: Returns the number of CPU cycles since reset. Unreliable if // the CPU frequency is variable. - return (int64)((_rdtsc() - RDTSC_BEGINTICK) / RDTSC_CLOCK); + return (int64)((rdtsc_() - RDTSC_BEGINTICK) / RDTSC_CLOCK); #elif defined(HAVE_MONOTONIC_CLOCK) // Monotonic clock: Implementation-defined. // Clock that cannot be set and represents monotonic time since some -- cgit v1.2.3-70-g09d2