freebsd-ports/sysutils/x86info/files/patch-bench_benchmarks.c
Yen-Ming Lee 38ca10bb38 update to 1.12b
Freshmeat blurb:
  Identifies several new CPUS. Additional MSR decoding on various
  CPUs. A few misidentification bugs have been fixed. Completely
  rewritten cachesize determination. Various new cache descriptors
  added. Numerous MHz estimation improvements. AMD K7 powernow
  register/BIOS decoding. Now decodes extended Intel feature flags,
  cpuid brand field, and sSpec on some models. AMD Opteron/Athlon64
  support. VIA Powersaver/Longhaul support. A --bugs option to display
  CPU errata. No longer retries opening /dev/msr if the first open
  fails. Fixes a memory leak in --url.

PR:		55937
Submitted by:	Erik Greenwald <erik@smluc.org>
2003-08-25 01:29:34 +00:00

21 lines
652 B
C

--- bench/benchmarks.c.orig Sun Aug 24 11:04:51 2003
+++ bench/benchmarks.c Sun Aug 24 11:08:26 2003
@@ -1,7 +1,8 @@
#include <time.h>
#include <sys/time.h>
-#include <asm/unistd.h>
+#include <sys/unistd.h>
#include <sys/stat.h>
+#include <sys/syscall.h>
#include <stdio.h>
#include "../x86info.h"
#include "bench.h"
@@ -13,7 +14,7 @@
if (show_bench != 1)
return;
- TIME(asm volatile("int $0x80" :"=a" (ret) :"0" (__NR_getppid)), "int 0x80");
+ TIME(asm volatile("int $0x80" :"=a" (ret) :"0" (SYS_getppid)), "int 0x80");
TIME(asm volatile("cpuid": : :"ax", "dx", "cx", "bx"), "cpuid");
TIME(asm volatile("addl $1,0(%esp)"), "addl");