Changeset 50be8af for tests/concurrency/channels/barrier.cfa
- Timestamp:
- Sep 17, 2023, 11:19:08 AM (11 months ago)
- Branches:
- master
- Children:
- 7edf912
- Parents:
- 697c957
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/concurrency/channels/barrier.cfa
r697c957 r50be8af 8 8 9 9 size_t total_operations = 0; 10 int Processors = 1, Tasks = 5, BarrierSize = 2; 10 ssize_t Processors = 1, Tasks = 5, BarrierSize = 2; // must be signed 11 11 12 12 typedef channel( int ) Channel; … … 65 65 case 3: 66 66 if ( strcmp( argv[2], "d" ) != 0 ) { // default ? 67 BarrierSize = ato i( argv[2] );68 if ( Processors < 1 ) goto Usage;67 BarrierSize = ato( argv[2] ); 68 if ( Processors < 1 ) fallthru default; 69 69 } // if 70 70 case 2: 71 71 if ( strcmp( argv[1], "d" ) != 0 ) { // default ? 72 Processors = ato i( argv[1] );73 if ( Processors < 1 ) goto Usage;72 Processors = ato( argv[1] ); 73 if ( Processors < 1 ) fallthru default; 74 74 } // if 75 75 case 1: // use defaults 76 76 break; 77 77 default: 78 Usage: 79 sout | "Usage: " | argv[0] 78 exit | "Usage: " | argv[0] 80 79 | " [ processors (> 0) | 'd' (default " | Processors 81 80 | ") ] [ BarrierSize (> 0) | 'd' (default " | BarrierSize 82 81 | ") ]" ; 83 exit( EXIT_FAILURE );84 82 } // switch 85 83 if ( Tasks < BarrierSize )
Note: See TracChangeset
for help on using the changeset viewer.