msc-queue: indentation, etc.
[model-checker-benchmarks.git] / mcs-queue / args.c
1 #include "main.h"
2
3 extern unsigned backoff_base_bits;
4 extern unsigned backoff_cap_bits;
5 extern unsigned iterations;
6 extern unsigned multi;
7 extern unsigned initial_nodes;
8 extern unsigned procs;
9 extern unsigned repetitions;
10 extern unsigned backoff_shift_bits;
11 extern unsigned work;
12
13 void parse_args(int argc, char **argv)
14 {
15         extern char * optarg;
16         int c;
17
18         while ((c = getopt(argc, argv, "b:c:i:m:n:p:r:s:w:")) != EOF)
19                 switch(c) {
20                         case 'b':  backoff_base_bits = atoi(optarg); break;
21                         case 'c':  backoff_cap_bits = atoi(optarg); break;
22                         case 'i':  iterations = atoi(optarg); break;
23                         case 'm':  multi = atoi(optarg);  break;
24                         case 'n':  initial_nodes = atoi(optarg);  break;
25                         case 'p':   procs = atoi(optarg);   break;
26                         case 'r':   repetitions = atoi(optarg);   break;
27                         case 's':   backoff_shift_bits = atoi(optarg);   break;
28                         case 'w':   work = atoi(optarg);   break;
29                         default:
30                                     assert(0);
31                 }
32 }