Ignore:
Timestamp:
Feb 4, 2020, 11:29:22 AM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
52142c2, 9f575ea, bdfc032
Parents:
09f357ec (diff), e56eb455 (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
  • benchmark/schedint/cfa4.cfa

    r09f357ec r4f7b418  
    44#include <stdio.h>
    55
    6 #include "bench.h"
     6#include "../bench.h"
    77
    88volatile int go = 0;
     9
    910condition c;
    1011monitor M {} m1, m2, m3, m4;
     
    1314        signal( c );
    1415}
    15 
    1616void __attribute__((noinline)) wait( M & mutex p1, M & mutex p2, M & mutex p3, M & mutex p4 ) {
    1717        go = 1;
     
    1919                wait( c );
    2020        }
    21         go = 0;
    2221}
    2322
    2423thread T {};
    2524void main( T & ) {
    26         while ( go == 0 ) { yield(); }
     25        while ( go == 0 ) { yield(); } // waiter must start first
    2726        BENCH(
    28                 while ( go == 1 ) { call( m1, m2, m3, m4 ); },
     27                for ( times ) { call( m1, m2, m3, m4 ); },
    2928                result
    3029        )
Note: See TracChangeset for help on using the changeset viewer.