Changeset fc12f05 for tests/concurrency


Ignore:
Timestamp:
Nov 13, 2023, 3:43:43 AM (2 years ago)
Author:
JiadaL <j82liang@…>
Branches:
master
Children:
25f2798
Parents:
0030b508 (diff), 2174191 (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

Location:
tests/concurrency
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • tests/concurrency/actors/.expect/dynamic.txt

    r0030b508 rfc12f05  
    11starting
    22started
    3 stopping
    43Done
    54stopped
  • tests/concurrency/actors/.expect/static.txt

    r0030b508 rfc12f05  
    11starting
    22started
    3 stopping
    43Done
    54stopped
  • tests/concurrency/actors/dynamic.cfa

    r0030b508 rfc12f05  
    5858        *d_actor | *d_msg;
    5959
    60         sout | "stopping";
    61 
    6260        stop_actor_system();
    6361
  • tests/concurrency/actors/static.cfa

    r0030b508 rfc12f05  
    5555        actor | msg;
    5656
    57         sout | "stopping";
    58 
    5957        stop_actor_system();
    6058
  • tests/concurrency/cofor.cfa

    r0030b508 rfc12f05  
    11#include <cofor.hfa>
    2 
    32
    43void add_num( long * total, long val ) { __atomic_fetch_add( total, (long)val, __ATOMIC_SEQ_CST ); }
     
    87    processor p[4];
    98    long total = 0;
    10     COFOR( i, 0, 10, __atomic_fetch_add( &total, i, __ATOMIC_SEQ_CST ); );
     9    cofor( i; 10 ) {
     10        __atomic_fetch_add( &total, i, __ATOMIC_SEQ_CST );
     11    }
    1112    {
    1213        corun;      // does nothing
  • tests/concurrency/waitfor/parse.cfa

    r0030b508 rfc12f05  
    1010// Created On       : Wed Aug 30 17:53:29 2017
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Apr 10 22:52:18 2023
    13 // Update Count     : 64
     12// Last Modified On : Wed Nov  1 07:28:19 2023
     13// Update Count     : 65
    1414//
    1515
     
    258258// Local Variables: //
    259259// tab-width: 4 //
    260 // compile-command: "cfa waitfor.cfa" //
     260// compile-command: "cfa parse.cfa" //
    261261// End: //
  • tests/concurrency/waituntil/channel_close.cfa

    r0030b508 rfc12f05  
    2626        for( ;; ) {
    2727            if ( useAnd ) {
    28                 waituntil( (in << A) ) { assert( A_removes == in ); A_removes++; removes++; }
    29                 and waituntil( (in2 << B) ) { assert( B_removes == in2 ); B_removes++; removes++; }
     28                waituntil( (in << A) ) { __atomic_thread_fence( __ATOMIC_SEQ_CST ); assert( A_removes == in ); A_removes++; removes++; }
     29                and waituntil( (in2 << B) ) { __atomic_thread_fence( __ATOMIC_SEQ_CST ); assert( B_removes == in2 ); B_removes++; removes++; }
    3030                continue;
    3131            }
    32             waituntil( (in << A) ) { assert( A_removes == in ); A_removes++; removes++; }
    33             or waituntil( (in << B) ) { assert( B_removes == in ); B_removes++; removes++; }
     32            waituntil( (in << A) ) { __atomic_thread_fence( __ATOMIC_SEQ_CST ); assert( A_removes == in ); A_removes++; removes++; }
     33            or waituntil( (in << B) ) { __atomic_thread_fence( __ATOMIC_SEQ_CST ); ( B_removes == in ); B_removes++; removes++; }
    3434        }
    3535    } catchResume ( channel_closed * e ) {} // continue to remove until would block
     
    3737    try {
    3838        for( ;; )
    39             waituntil( (in << A) ) { assert( A_removes == in ); A_removes++; removes++; }
     39            waituntil( (in << A) ) { __atomic_thread_fence( __ATOMIC_SEQ_CST ); assert( A_removes == in ); A_removes++; removes++; }
    4040    } catchResume ( channel_closed * e ) {} // continue to remove until would block
    4141    catch ( channel_closed * e ) {}
    4242    try {
    4343        for( ;; )
    44             waituntil( (in << B) ) { assert( B_removes == in ); B_removes++; removes++; }
     44            waituntil( (in << B) ) { __atomic_thread_fence( __ATOMIC_SEQ_CST ); assert( B_removes == in ); B_removes++; removes++; }
    4545    } catchResume ( channel_closed * e ) {} // continue to remove until would block
    4646    catch ( channel_closed * e ) {}
Note: See TracChangeset for help on using the changeset viewer.