33 lines
917 B
Text
33 lines
917 B
Text
$NetBSD: patch-ao,v 1.2 2005/03/03 11:54:31 garbled Exp $
|
|
--- src/lat_ctx.c.orig 1997-06-26 17:34:37.000000000 -0700
|
|
+++ src/lat_ctx.c 2005-03-03 01:21:56.000000000 -0700
|
|
@@ -63,6 +63,7 @@
|
|
pid_t pids[MAX_PROCS]; /* process ID's */
|
|
int *pbuffer; /* memory buffer for procs to sum */
|
|
int *locdata; /* proc's memory buffer for procs to sum */
|
|
+int initial_niter; /* number of iterations we were requesed to do */
|
|
|
|
int
|
|
main(ac, av)
|
|
@@ -84,7 +85,7 @@
|
|
}
|
|
|
|
/* parse command line parameters */
|
|
- niter = atoi(av[1]);
|
|
+ initial_niter = niter = atoi(av[1]);
|
|
sprocs = parse_bytes(av[2]);
|
|
nprocs = atoi(av[3]);
|
|
|
|
@@ -276,6 +277,12 @@
|
|
int i;
|
|
clk_t val;
|
|
|
|
+ if (initial_niter == 0) {
|
|
+ /* We are only trying to find how many times to run the test */
|
|
+ do_overhead1(num_iter >> 1, t);
|
|
+ return 0;
|
|
+ }
|
|
+
|
|
centeravg_reset(OVERHEADAVG_LOOPS, OVERHEADAVG_TAILS);
|
|
|
|
for (i = OVERHEADAVG_LOOPS; i > 0; i--) {
|