Ignore:
Timestamp:
Sep 21, 2023, 10:15:58 PM (2 years ago)
Author:
JiadaL <j82liang@…>
Branches:
master, stuck-waitfor-destruct
Children:
62c6cfa
Parents:
c1e66d9 (diff), 5a1ae14 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/concurrency/channels/contend.cfa

    rc1e66d9 rdeda7e6  
    127127          case 3:
    128128                if ( strcmp( argv[2], "d" ) != 0 ) {                    // default ?
    129                         ChannelSize = atoi( argv[2] );
     129                        ChannelSize = ato( argv[2] );
     130                        if ( ChannelSize < 1 ) fallthru default;
    130131                } // if
    131132          case 2:
    132133                if ( strcmp( argv[1], "d" ) != 0 ) {                    // default ?
    133                         Processors = atoi( argv[1] );
    134                         if ( Processors < 1 ) goto Usage;
     134                        Processors = ato( argv[1] );
     135                        if ( Processors < 1 ) fallthru default;
    135136                } // if
    136137          case 1:                                                                                       // use defaults
    137138                break;
    138139          default:
    139           Usage:
    140                 sout | "Usage: " | argv[0]
     140                exit | "Usage: " | argv[0]
    141141             | " [ processors (> 0) | 'd' (default " | Processors
    142142                         | ") ] [ channel size (>= 0) | 'd' (default " | ChannelSize
    143143                         | ") ]" ;
    144                 exit( EXIT_FAILURE );
    145144        } // switch
     145
    146146    test(Processors, Channels, Producers, Consumers, ChannelSize);
    147147}
Note: See TracChangeset for help on using the changeset viewer.