Ignore:
Timestamp:
Aug 11, 2020, 3:00:21 PM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
cd02108
Parents:
7f6e9eb
Message:

Upgraded yield benchmark to use new parseargs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • benchmark/readyQ/yield.cfa

    r7f6e9eb r5bcdc8c  
    4343
    4444int main(int argc, char * argv[]) {
    45         BENCH_DECL
    4645        unsigned num_io = 1;
    4746        io_context_params params;
    4847
    49         for(;;) {
    50                 static struct option options[] = {
    51                         BENCH_OPT_LONG
    52                         {0, 0, 0, 0}
    53                 };
     48        cfa_option opt[] = {
     49                BENCH_OPT_CFA
     50        };
     51        int opt_cnt = sizeof(opt) / sizeof(cfa_option);
    5452
    55                 int idx = 0;
    56                 int opt = getopt_long(argc, argv, BENCH_OPT_SHORT, options, &idx);
    57 
    58                 const char * arg = optarg ? optarg : "";
    59                 char * end;
    60                 switch(opt) {
    61                         case -1:
    62                                 goto run;
    63                         BENCH_OPT_CASE
    64                         default: /* ? */
    65                                 fprintf( stderr, "Unkown option '%c'\n", opt);
    66                         usage:
    67                                 bench_usage( argv );
    68                                 exit(1);
    69                 }
    70         }
    71         run:
     53        char **left;
     54        parse_args( argc, argv, opt, opt_cnt, "[OPTIONS]...\ncforall yield benchmark", left );
    7255
    7356        {
Note: See TracChangeset for help on using the changeset viewer.