1 /*******************************************************************************
2 * The BYTE UNIX Benchmarks - Release 3
3 * Module: hanoi.c SID: 3.3 5/15/91 19:30:20
5 *******************************************************************************
6 * Bug reports, patches, comments, suggestions should be sent to:
8 * Ben Smith, Rick Grehan or Tom Yager
9 * ben@bytepb.byte.com rick_g@bytepb.byte.com tyager@bytepb.byte.com
11 *******************************************************************************
13 * $Header: hanoi.c,v 3.5 87/08/06 08:11:14 kenj Exp $
14 * August 28, 1990 - Modified timing routines (ty)
15 * October 22, 1997 - code cleanup to remove ANSI C compiler warnings
16 * Andy Kahn <kahn@zk3.dec.com>
18 ******************************************************************************/
19 char SCCSid
[] = "@(#) @(#)hanoi.c:3.3 -- 5/15/91 19:30:20";
21 #define other(i,j) (6-(i+j))
27 void mov(int n
, int f
, int t
);
29 unsigned long iter
= 0;
35 fprintf(stderr
,"COUNT|%ld|1|lps\n", iter
);
40 int main(int argc
, char *argv
[])
42 int disk
=10, /* default number of disks */
46 fprintf(stderr
,"Usage: %s duration [disks]\n", argv
[0]);
49 duration
= atoi(argv
[1]);
50 if(argc
> 2) disk
= atoi(argv
[2]);
53 wake_me(duration
, report
);
63 void mov(int n
, int f
, int t
)