Ignore:
Timestamp:
Jan 21, 2020, 6:14:34 PM (5 years ago)
Author:
Peter A. Buhr <pabuhr@…>
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:
5518719
Parents:
c12869e
Message:

update benchmarks for concurrency paper

File:
1 edited

Legend:

Unmodified
Added
Removed
  • benchmark/schedint/cfa4.cfa

    rc12869e r26fd986  
    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.