Ignore:
File:
1 edited

Legend:

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

    r50be8af rc26bea2a  
    88
    99size_t total_operations = 0;
    10 ssize_t Processors = 1, Tasks = 5, BarrierSize = 2;             // must be signed
     10int Processors = 1, Tasks = 5, BarrierSize = 2;
    1111
    1212typedef channel( int ) Channel;
     
    6565          case 3:
    6666                if ( strcmp( argv[2], "d" ) != 0 ) {                    // default ?
    67                         BarrierSize = ato( argv[2] );
    68             if ( Processors < 1 ) fallthru default;
     67                        BarrierSize = atoi( argv[2] );
     68            if ( Processors < 1 ) goto Usage;
    6969                } // if
    7070          case 2:
    7171                if ( strcmp( argv[1], "d" ) != 0 ) {                    // default ?
    72                         Processors = ato( argv[1] );
    73                         if ( Processors < 1 ) fallthru default;
     72                        Processors = atoi( argv[1] );
     73                        if ( Processors < 1 ) goto Usage;
    7474                } // if
    7575          case 1:                                                                                       // use defaults
    7676                break;
    7777          default:
    78                 exit | "Usage: " | argv[0]
     78          Usage:
     79                sout | "Usage: " | argv[0]
    7980             | " [ processors (> 0) | 'd' (default " | Processors
    8081                         | ") ] [ BarrierSize (> 0) | 'd' (default " | BarrierSize
    8182                         | ") ]" ;
     83                exit( EXIT_FAILURE );
    8284        } // switch
    8385    if ( Tasks < BarrierSize )
Note: See TracChangeset for help on using the changeset viewer.