Changeset 8a930c03 for tests/concurrency


Ignore:
Timestamp:
Jun 12, 2023, 12:05:58 PM (3 years ago)
Author:
JiadaL <j82liang@…>
Branches:
master, stuck-waitfor-destruct
Children:
fec8bd1
Parents:
2b78949 (diff), 38e266ca (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:
5 added
198 moved

Legend:

Unmodified
Added
Removed
  • tests/concurrency/.expect/ctor-check.txt

    r2b78949 r8a930c03  
    1 concurrent/ctor-check.cfa:11:1 error: constructors cannot have mutex parameters
     1concurrency/ctor-check.cfa:11:1 error: constructors cannot have mutex parameters
    22?{}: function
    33... with parameters
  • tests/concurrency/actors/dynamic.cfa

    r2b78949 r8a930c03  
    1919void ?{}( derived_msg & this ) { ((derived_msg &)this){ 0 }; }
    2020
    21 Allocation receive( derived_actor & receiver, derived_msg & msg ) {
     21allocation receive( derived_actor & receiver, derived_msg & msg ) {
    2222    if ( msg.cnt >= Times ) {
    2323        sout | "Done";
  • tests/concurrency/actors/executor.cfa

    r2b78949 r8a930c03  
    2424struct d_msg { inline message; } shared_msg;
    2525
    26 Allocation receive( d_actor & this, d_msg & msg ) with( this ) {
     26allocation receive( d_actor & this, d_msg & msg ) with( this ) {
    2727    if ( recs == rounds ) return Finished;
    2828    if ( recs % Batch == 0 ) {
  • tests/concurrency/actors/inherit.cfa

    r2b78949 r8a930c03  
    1515void ^?{}( D_msg & this ) { mutex(sout) sout | 'A'; }
    1616
    17 Allocation handle() {
     17allocation handle() {
    1818    return Finished;
    1919}
    2020
    21 Allocation receive( Server & receiver, D_msg & msg ) { return handle(); }
    22 Allocation receive( Server & receiver, D_msg2 & msg ) { return handle(); }
    23 Allocation receive( Server2 & receiver, D_msg & msg ) { return Delete; }
    24 Allocation receive( Server2 & receiver, D_msg2 & msg ) { return Delete; }
     21allocation receive( Server & receiver, D_msg & msg ) { return handle(); }
     22allocation receive( Server & receiver, D_msg2 & msg ) { return handle(); }
     23allocation receive( Server2 & receiver, D_msg & msg ) { return Delete; }
     24allocation receive( Server2 & receiver, D_msg2 & msg ) { return Delete; }
    2525
    2626int main() {
  • tests/concurrency/actors/matrix.cfa

    r2b78949 r8a930c03  
    2424}
    2525
    26 Allocation receive( derived_actor & receiver, derived_msg & msg ) {
     26allocation receive( derived_actor & receiver, derived_msg & msg ) {
    2727    for ( unsigned int i = 0; i < yc; i += 1 ) { // multiply X_row by Y_col and sum products
    2828        msg.Z[i] = 0;
  • tests/concurrency/actors/pingpong.cfa

    r2b78949 r8a930c03  
    1919size_t times = 100000;
    2020
    21 Allocation receive( ping & receiver, p_msg & msg ) {
     21allocation receive( ping & receiver, p_msg & msg ) {
    2222    msg.count++;
    2323    if ( msg.count > times ) return Finished;
    2424
    25     Allocation retval = Nodelete;
     25    allocation retval = Nodelete;
    2626    if ( msg.count == times ) retval = Finished;
    2727    *po << msg;
     
    2929}
    3030
    31 Allocation receive( pong & receiver, p_msg & msg ) {
     31allocation receive( pong & receiver, p_msg & msg ) {
    3232    msg.count++;
    3333    if ( msg.count > times ) return Finished;
    3434   
    35     Allocation retval = Nodelete;
     35    allocation retval = Nodelete;
    3636    if ( msg.count == times ) retval = Finished;
    3737    *pi << msg;
  • tests/concurrency/actors/poison.cfa

    r2b78949 r8a930c03  
    1818        Server s[10];
    1919        for ( i; 10 ) {
    20             s[i] << FinishedMsg;
     20            s[i] << finished_msg;
    2121        }
    2222        stop_actor_system();
     
    2929            Server * s = alloc();
    3030            (*s){};
    31             (*s) << DeleteMsg;
     31            (*s) << delete_msg;
    3232        }
    3333        stop_actor_system();
     
    3939        Server s[10];
    4040        for ( i; 10 )
    41             s[i] << DestroyMsg;
     41            s[i] << destroy_msg;
    4242        stop_actor_system();
    4343        for ( i; 10 )
  • tests/concurrency/actors/static.cfa

    r2b78949 r8a930c03  
    1919void ?{}( derived_msg & this ) { ((derived_msg &)this){ 0 }; }
    2020
    21 Allocation receive( derived_actor & receiver, derived_msg & msg ) {
     21allocation receive( derived_actor & receiver, derived_msg & msg ) {
    2222    if ( msg.cnt >= Times ) {
    2323        sout | "Done";
  • tests/concurrency/actors/types.cfa

    r2b78949 r8a930c03  
    2020
    2121// this isn't a valid receive routine since int is not a message type
    22 Allocation receive( derived_actor & receiver, int i ) with( receiver ) {
     22allocation receive( derived_actor & receiver, int i ) with( receiver ) {
    2323    mutex(sout) sout | i;
    2424    counter++;
     
    2727}
    2828
    29 Allocation receive( derived_actor & receiver, d_msg & msg ) {
     29allocation receive( derived_actor & receiver, d_msg & msg ) {
    3030    return receive( receiver, msg.num );
    3131}
     
    3636};
    3737
    38 Allocation receive( derived_actor2 & receiver, d_msg & msg ) {
     38allocation receive( derived_actor2 & receiver, d_msg & msg ) {
    3939    mutex(sout) sout | msg.num;
    4040    return Finished;
     
    4848};
    4949
    50 Allocation receive( derived_actor3 & receiver, d_msg & msg ) {
     50allocation receive( derived_actor3 & receiver, d_msg & msg ) {
    5151    mutex(sout) sout | msg.num;
    5252    if ( msg.num == -1 ) return Nodelete;
     
    5454}
    5555
    56 Allocation receive( derived_actor3 & receiver, d_msg2 & msg ) {
     56allocation receive( derived_actor3 & receiver, d_msg2 & msg ) {
    5757    mutex(sout) sout | msg.num;
    5858    return Finished;
  • tests/concurrency/barrier/gen_generation_expect.cfa

    r2b78949 r8a930c03  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // gen_generation_expect.cfa -- simple 'script' generates the expect file for concurrent/barrier/generation
     7// gen_generation_expect.cfa -- simple 'script' generates the expect file for concurrency/barrier/generation
    88//
    99// Author           : Thierry Delisle
  • tests/concurrency/barrier/generation.cfa

    r2b78949 r8a930c03  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // concurrent/barrier/generation.cfa -- simple test that validates barriers by printing
    8 //                                      alphabetical generations
     7// generation.cfa -- simple test that validates barriers by printing alphabetical generations
    98//
    109// Author           : Thierry Delisle
  • tests/concurrency/barrier/last.cfa

    r2b78949 r8a930c03  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // concurrent/barrier/last.cfa -- validates barrier's last hook functionality
     7// last.cfa -- validates barrier's last hook functionality
    88//
    99// Author           : Thierry Delisle
  • tests/concurrency/barrier/order.cfa

    r2b78949 r8a930c03  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // concurrent/barrier/order.cfa -- validates barriers the return value of
     7// order.cfa -- validates barriers the return value of
    88//                                 barrier block
    99//
  • tests/concurrency/readyQ/barrier_sleeper.cfa

    r2b78949 r8a930c03  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // concurrent/readyQ/barrier_sleeper.cfa -- testing the ready-queue
     7// barrier_sleeper.cfa -- testing the ready-queue
    88//
    99// Author           : Thierry Delisle
  • tests/concurrency/readyQ/leader_spin.cfa

    r2b78949 r8a930c03  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // concurrent/readyQ/leader_spin.cfa -- validates ready queue fairness
     7// leader_spin.cfa -- validates ready queue fairness
    88//
    99// Author           : Thierry Delisle
  • tests/concurrency/waituntil/locks.cfa

    r2b78949 r8a930c03  
    22#include <thread.hfa>
    33#include <locks.hfa>
     4#include <fstream.hfa>
    45#include <mutex_stmt.hfa>
    56
Note: See TracChangeset for help on using the changeset viewer.