Ignore:
Timestamp:
Jan 21, 2020, 6:14:34 PM (23 months ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
arm-eh, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr
Children:
5518719
Parents:
c12869e
Message:

update benchmarks for concurrency paper

File:
1 edited

Legend:

Unmodified
Added
Removed
  • benchmark/schedext/cfa4.cfa

    rc12869e r26fd986  
    44#include <stdio.h>
    55
    6 #include "bench.h"
    7 
    8 volatile int go = 0;
     6#include "../bench.h"
    97
    108monitor M {} m1, m2, m3, m4;
    119
    1210void __attribute__((noinline)) call( M & mutex p1, M & mutex p2, M & mutex p3, M & mutex p4 ) {}
    13 
    1411void __attribute__((noinline)) wait( M & mutex p1, M & mutex p2, M & mutex p3, M & mutex p4 ) {
    15         go = 1;
    1612        for ( times ) {
    1713                waitfor( call : p1, p2, p3, p4 );
    1814        }
    19         go = 0;
    2015}
    21 
    2216thread T {};
    2317void main( T & ) {
    24         while( go == 0 ) { yield(); }
    2518        BENCH(
    26                 while( go == 1 ) { call( m1, m2, m3, m4 ); },
     19                for ( times ) {
     20                        call( m1, m2, m3, m4 );
     21                },
    2722                result
    2823        )
Note: See TracChangeset for help on using the changeset viewer.