Ignore:
Timestamp:
Aug 25, 2017, 10:38:34 AM (8 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
800d275
Parents:
af08051 (diff), 3eab308c (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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/tests/sched-int-wait.c

    raf08051 r28e58fd  
    3333//----------------------------------------------------------------------------------------------------
    3434// Tools
    35 void signal( condition * cond, global_t * mutex a, global_t * mutex b ) {
     35void signal( condition * cond, global_t & mutex a, global_t & mutex b ) {
    3636        signal( cond );
    3737}
    3838
    39 void signal( condition * cond, global_t * mutex a, global_t * mutex b, global_t * mutex c ) {
     39void signal( condition * cond, global_t & mutex a, global_t & mutex b, global_t & mutex c ) {
    4040        signal( cond );
    4141}
    4242
    43 void wait( condition * cond, global_t * mutex a, global_t * mutex b ) {
     43void wait( condition * cond, global_t & mutex a, global_t & mutex b ) {
    4444        wait( cond );
    4545}
    4646
    47 void wait( condition * cond, global_t * mutex a, global_t * mutex b, global_t * mutex c ) {
     47void wait( condition * cond, global_t & mutex a, global_t & mutex b, global_t & mutex c ) {
    4848        wait( cond );
    4949}
     
    5151//----------------------------------------------------------------------------------------------------
    5252// Signaler
    53 void main( Signaler* this ) {
     53void main( Signaler & this ) {
    5454
    5555        while( waiter_left != 0 ) {
     
    5757                switch( action ) {
    5858                        case 0:
    59                                 signal( &condABC, &globalA, &globalB, &globalC );
     59                                signal( &condABC, globalA, globalB, globalC );
    6060                                break;
    6161                        case 1:
    62                                 signal( &condAB , &globalA, &globalB );
     62                                signal( &condAB , globalA, globalB );
    6363                                break;
    6464                        case 2:
    65                                 signal( &condBC , &globalB, &globalC );
     65                                signal( &condBC , globalB, globalC );
    6666                                break;
    6767                        case 3:
    68                                 signal( &condAC , &globalA, &globalC );
     68                                signal( &condAC , globalA, globalC );
    6969                                break;
    7070                        default:
     
    7878//----------------------------------------------------------------------------------------------------
    7979// Waiter ABC
    80 void main( WaiterABC* this ) {
     80void main( WaiterABC & this ) {
    8181        for( int i = 0; i < N; i++ ) {
    82                 wait( &condABC, &globalA, &globalB, &globalC );
     82                wait( &condABC, globalA, globalB, globalC );
    8383        }
    8484
     
    8888//----------------------------------------------------------------------------------------------------
    8989// Waiter AB
    90 void main( WaiterAB* this ) {
     90void main( WaiterAB & this ) {
    9191        for( int i = 0; i < N; i++ ) {
    92                 wait( &condAB , &globalA, &globalB );
     92                wait( &condAB , globalA, globalB );
    9393        }
    9494
     
    9898//----------------------------------------------------------------------------------------------------
    9999// Waiter AC
    100 void main( WaiterAC* this ) {
     100void main( WaiterAC & this ) {
    101101        for( int i = 0; i < N; i++ ) {
    102                 wait( &condAC , &globalA, &globalC );
     102                wait( &condAC , globalA, globalC );
    103103        }
    104104
     
    108108//----------------------------------------------------------------------------------------------------
    109109// Waiter BC
    110 void main( WaiterBC* this ) {
     110void main( WaiterBC & this ) {
    111111        for( int i = 0; i < N; i++ ) {
    112                 wait( &condBC , &globalB, &globalC );
     112                wait( &condBC , globalB, globalC );
    113113        }
    114114
Note: See TracChangeset for help on using the changeset viewer.