summaryrefslogtreecommitdiff
path: root/bench
diff options
context:
space:
mode:
authorDave Jones <davej@redhat.com>2009-10-26 17:19:05 -0400
committerDave Jones <davej@redhat.com>2009-10-26 17:19:05 -0400
commit3aa21b5d657644980e5acd1ae87461b46bb24790 (patch)
tree8810648fee0fcfbccc04e83930442384e602bf11 /bench
parente4dfd58ecfa0a3d41261f89a71087495b47d9c9b (diff)
cleanup the rdtsc type usage a little.
Diffstat (limited to 'bench')
-rw-r--r--bench/MHz.c2
-rw-r--r--bench/bench.h8
2 files changed, 4 insertions, 6 deletions
diff --git a/bench/MHz.c b/bench/MHz.c
index bc5f430..34cac39 100644
--- a/bench/MHz.c
+++ b/bench/MHz.c
@@ -24,7 +24,7 @@ static void sighandler(int sig __attribute__((unused)))
void estimate_MHz(struct cpudata *cpu)
{
- unsigned long long int cycles[2]; /* gotta be 64 bit */
+ unsigned long long cycles[2]; /* gotta be 64 bit */
unsigned int eax, ebx, ecx, edx;
unsigned long r;
diff --git a/bench/bench.h b/bench/bench.h
index b463dfa..410bc66 100644
--- a/bench/bench.h
+++ b/bench/bench.h
@@ -1,11 +1,9 @@
-static inline unsigned long long int rdtsc(void)
+static unsigned long long rdtsc(void)
{
- unsigned int low, high;
- unsigned long tsc;
+ unsigned long low, high;
__asm__ __volatile__("rdtsc" : "=a" (low), "=d" (high));
- tsc = ((unsigned long long) high << 32) | low;
- return tsc;
+ return (high << 32) | low;
}
#define NREPS 1000