Changeset 2a301ff for tests/concurrency


Ignore:
Timestamp:
Aug 31, 2023, 11:31:15 PM (3 years ago)
Author:
JiadaL <j82liang@…>
Branches:
master, stuck-waitfor-destruct
Children:
950c58e
Parents:
92355883 (diff), 686912c (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:

Resolve conflict

Location:
tests/concurrency
Files:
4 added
9 edited

Legend:

Unmodified
Added
Removed
  • tests/concurrency/actors/inherit.cfa

    r92355883 r2a301ff  
    1313struct D_msg { int a; inline message; };
    1414void ?{}( D_msg & this ) { set_allocation( this, Delete ); }
    15 void ^?{}( D_msg & this ) { mutex(sout) sout | 'A'; }
     15void ^?{}( D_msg & ) { mutex(sout) sout | 'A'; }
    1616
    1717struct D_msg2 { inline D_msg; };
  • tests/concurrency/channels/daisy_chain.cfa

    r92355883 r2a301ff  
    1919void main(Task & this) {
    2020    size_t runs = 0;
     21    int token = 0;
    2122    try{
    2223        for ( ;; ) {
    23             remove( *chain );
    24             insert( *chain, 0 );
     24            token << *chain;
     25            *chain << token;
    2526            runs++;
    2627        }
     
    5960    Channel chainChan{ 1 };
    6061
    61     insert( chainChan, 0 );
     62    chainChan << ((int)0);
    6263
    6364    chain = &chainChan;   
  • tests/concurrency/unified_locking/thread_test.cfa

    r92355883 r2a301ff  
    33#include <stdlib.hfa>
    44#include <thread.hfa>
    5 #include <containers/array.hfa>
     5#include <collections/array.hfa>
    66
    77static unsigned int taskCount = 4;
  • tests/concurrency/waituntil/all_types.cfa

    r92355883 r2a301ff  
    9696            Churner c;
    9797            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; }
    9999                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; }
    101101                and waituntil( timeout( 1`ns ) ) {}
    102102                if ( j == numtimes / 2 )
  • tests/concurrency/waituntil/channel_close.cfa

    r92355883 r2a301ff  
    1313    try {
    1414        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++; }
    1717        }
    1818    } catch ( channel_closed * e ) {}
     
    3131            }
    3232            waituntil( (in << A) ) { assert( A_removes == in ); A_removes++; removes++; }
    33             or waituntil( (in2 << B) ) { assert( B_removes == in2 ); B_removes++; removes++; }
     33            or waituntil( (in << B) ) { assert( B_removes == in ); B_removes++; removes++; }
    3434        }
    3535    } catchResume ( channel_closed * e ) {} // continue to remove until would block
     
    7474    ^B{};
    7575
     76    useAnd = true;
     77
    7678    inserts = 0;
    7779    removes = 0;
  • tests/concurrency/waituntil/channel_zero_size.cfa

    r92355883 r2a301ff  
    3737        for( long long int j = 0; j < numtimes; j++ ) {
    3838            // 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; }
    4242        }
    4343        printf("sending sentinels\n");
  • tests/concurrency/waituntil/channels.cfa

    r92355883 r2a301ff  
    6969            Churner c;
    7070            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; }
    7474            }
    7575            done = true;
  • tests/concurrency/waituntil/one_chan.cfa

    r92355883 r2a301ff  
    3131        Server1 s[numServers];
    3232        for( long long int j = 0; j < numtimes; j++ ) {
    33             waituntil( j >> C ) { total += j; }
     33            waituntil( C << j ) { total += j; }
    3434        }
    3535        printf("waiting for empty channels\n");
  • tests/concurrency/waituntil/timeout.cfa

    r92355883 r2a301ff  
    1515
    1616    assert( count == 1000 );
     17    sleep( 1`ms );
    1718    printf("done\n");
    1819}
Note: See TracChangeset for help on using the changeset viewer.