Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • benchmark/schedext/cfa2.cfa

    r26fd986 r2316525  
    44#include <stdio.h>
    55
    6 #include "../bench.h"
     6#include "bench.h"
     7
     8volatile int go = 0;
    79
    810monitor M {} m1, m2;
    911
    1012void __attribute__((noinline)) call( M & mutex p1, M & mutex p2 ) {}
     13
    1114void __attribute__((noinline)) wait( M & mutex p1, M & mutex p2 ) {
     15        go = 1;
    1216        for ( times ) {
    1317                waitfor( call : p1, p2 );
    1418        }
     19        go = 0;
    1520}
     21
    1622thread T {};
    1723void main( T & ) {
     24        while( go == 0 ) { yield(); }
    1825        BENCH(
    19                 for ( times ) {
    20                         call( m1, m2 );
    21                 },
     26                while ( go == 1 ) { call( m1, m2 ); },
    2227                result
    2328        )
Note: See TracChangeset for help on using the changeset viewer.