Changeset cb344f7 for tests/concurrency
- Timestamp:
- Jul 18, 2023, 9:31:57 AM (17 months ago)
- Branches:
- master
- Children:
- ca22a7c
- Parents:
- a1467c1
- Location:
- tests/concurrency
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/concurrency/channels/daisy_chain.cfa
ra1467c1 rcb344f7 23 23 for ( ;; ) { 24 24 token << *chain; 25 token >> *chain;25 *chain << token; 26 26 runs++; 27 27 } … … 60 60 Channel chainChan{ 1 }; 61 61 62 ((int)0) >> chainChan;62 chainChan << ((int)0); 63 63 64 64 chain = &chainChan; -
tests/concurrency/waituntil/all_types.cfa
ra1467c1 rcb344f7 96 96 Churner c; 97 97 for( long long int j = 0; j < numtimes; j++ ) { 98 when( j % 2 == 0 ) waituntil( j >> A) { total += j; }98 when( j % 2 == 0 ) waituntil( A << j ) { total += j; } 99 99 or when( j % 4 < 2 ) waituntil( B ) { produce_b_val( total ); } 100 and when( j % 8 < 4 ) waituntil( j >> C) { total += j; }100 and when( j % 8 < 4 ) waituntil( C << j ) { total += j; } 101 101 and waituntil( timeout( 1`ns ) ) {} 102 102 if ( j == numtimes / 2 ) -
tests/concurrency/waituntil/channel_close.cfa
ra1467c1 rcb344f7 13 13 try { 14 14 for( long long int i = 0;;i++ ) { 15 waituntil( (i >> A)) { inserts++; }16 and waituntil( (i >> B)) { inserts++; }15 waituntil( A << i ) { inserts++; } 16 and waituntil( B << i ) { inserts++; } 17 17 } 18 18 } catch ( channel_closed * e ) {} -
tests/concurrency/waituntil/channel_zero_size.cfa
ra1467c1 rcb344f7 37 37 for( long long int j = 0; j < numtimes; j++ ) { 38 38 // printf("loop\n"); 39 waituntil( j >> A) { total += j; }40 or waituntil( j >> B) { total += j; }41 or waituntil( j >> C) { total += j; }39 waituntil( A << j ) { total += j; } 40 or waituntil( B << j ) { total += j; } 41 or waituntil( C << j ) { total += j; } 42 42 } 43 43 printf("sending sentinels\n"); -
tests/concurrency/waituntil/channels.cfa
ra1467c1 rcb344f7 69 69 Churner c; 70 70 for( long long int j = 0; j < numtimes; j++ ) { 71 when( j % 2 == 0 ) waituntil( j >> A) { total += j; }72 or when( j % 4 < 2 ) waituntil( j >> B) { total += j; }73 and when( j % 8 < 4 ) waituntil( j >> C) { total += j; }71 when( j % 2 == 0 ) waituntil( A << j ) { total += j; } 72 or when( j % 4 < 2 ) waituntil( B << j ) { total += j; } 73 and when( j % 8 < 4 ) waituntil( C << j ) { total += j; } 74 74 } 75 75 done = true; -
tests/concurrency/waituntil/one_chan.cfa
ra1467c1 rcb344f7 31 31 Server1 s[numServers]; 32 32 for( long long int j = 0; j < numtimes; j++ ) { 33 waituntil( j >> C) { total += j; }33 waituntil( C << j ) { total += j; } 34 34 } 35 35 printf("waiting for empty channels\n"); -
tests/concurrency/waituntil/repeat_close.cfa
ra1467c1 rcb344f7 15 15 try { 16 16 for( long long int i = 0;;i++ ) { 17 waituntil( (i >> A)) { A_i++; }18 and waituntil( (i >> B)) { B_i++; }19 and waituntil( (i >> C)) { C_i++; }20 and waituntil( (i >> D)) { D_i++; }21 and waituntil( (i >> E)) { E_i++; }22 and waituntil( (i >> F)) { F_i++; }17 waituntil( A << i ) { A_i++; } 18 and waituntil( B << i ) { B_i++; } 19 and waituntil( C << i ) { C_i++; } 20 and waituntil( D << i ) { D_i++; } 21 and waituntil( E << i ) { E_i++; } 22 and waituntil( F << i ) { F_i++; } 23 23 } 24 24 } catch ( channel_closed * e ) {} … … 31 31 try { 32 32 for( ;; ) { 33 waituntil( remove(F)) { F_removes++; }34 or waituntil( remove(E)) { E_removes++; }35 or waituntil( remove(D)) { D_removes++; }36 or waituntil( remove(C)) { C_removes++; }37 or waituntil( remove(B)) { B_removes++; }38 or waituntil( remove(A)) { A_removes++; }33 waituntil( in << F ) { F_removes++; } 34 or waituntil( in << E ) { E_removes++; } 35 or waituntil( in << D ) { D_removes++; } 36 or waituntil( in << C ) { C_removes++; } 37 or waituntil( in << B ) { B_removes++; } 38 or waituntil( in << A ) { A_removes++; } 39 39 } 40 40 } catchResume ( channel_closed * e ) { } // continue to remove until would block
Note: See TracChangeset
for help on using the changeset viewer.