summaryrefslogtreecommitdiff
path: root/bench
diff options
context:
space:
mode:
authorJohn Levon <levon@movementarian.org>2007-06-06 20:31:37 -0400
committerDave Jones <davej@redhat.com>2007-06-06 20:31:37 -0400
commit5be7af495f89af870cbf314e0fff6cb1dee0a426 (patch)
tree390d3ffd7a10691de6390fe7912507c34d71b5c4 /bench
parentd2f5c63294312c72194293fba8e1ac7ade0451c2 (diff)
Solaris support.
Diffstat (limited to 'bench')
-rw-r--r--bench/benchmarks.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/bench/benchmarks.c b/bench/benchmarks.c
index ac24c22..49ff008 100644
--- a/bench/benchmarks.c
+++ b/bench/benchmarks.c
@@ -1,19 +1,24 @@
#include <time.h>
#include <sys/time.h>
-#include <asm/unistd.h>
#include <sys/stat.h>
#include <stdio.h>
#include "../x86info.h"
#include "bench.h"
+#ifdef __linux__
+#include <asm/unistd.h>
+#endif
+
void show_benchmarks(void)
{
- int ret, tmp=0;
+ int tmp = 0;
if (show_bench != 1)
return;
- TIME(asm volatile("int $0x80" :"=a" (ret) :"0" (__NR_getppid)), "int 0x80");
+#ifdef __linux__
+ TIME(asm volatile("int $0x80" :"=a" (tmp) :"0" (__NR_getppid)), "int 0x80");
+#endif
TIME(asm volatile("cpuid": : :"ax", "dx", "cx", "bx"), "cpuid");
TIME(asm volatile("addl $1,0(%esp)"), "addl");