Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • benchmark/schedint/cfa4.cfa

    r2316525 r6e540ea  
    77
    88volatile int go = 0;
     9
    910condition c;
    10 monitor M {} m1, m2, m3, m4;
     11monitor M {};
     12M m1, m2, m3, m4;
    1113
    12 void __attribute__((noinline)) call( M & mutex p1, M & mutex p2, M & mutex p3, M & mutex p4 ) {
    13         signal( c );
     14void __attribute__((noinline)) call( M & mutex a1, M & mutex a2, M & mutex a3, M & mutex a4 ) {
     15        signal(c);
    1416}
    1517
    16 void __attribute__((noinline)) wait( M & mutex p1, M & mutex p2, M & mutex p3, M & mutex p4 ) {
     18int  __attribute__((noinline)) wait( M & mutex a1, M & mutex a2, M & mutex a3, M & mutex a4 ) {
    1719        go = 1;
    18         for ( times ) {
    19                 wait( c );
    20         }
     20        BENCH(
     21                for ( i; times ) {
     22                        wait(c);
     23                },
     24                result
     25        )
     26        printf( "%g\n", result );
    2127        go = 0;
     28        return 0;
    2229}
    2330
    2431thread T {};
     32void ^?{}( T & mutex this ) {}
    2533void main( T & ) {
    26         while ( go == 0 ) { yield(); }
    27         BENCH(
    28                 while ( go == 1 ) { call( m1, m2, m3, m4 ); },
    29                 result
    30         )
    31         printf( "%g\n", result );
     34        while(go == 0) { yield(); }
     35        while(go == 1) { call(m1, m2, m3, m4); }
     36
    3237}
    3338
     
    3540        BENCH_START()
    3641        T t;
    37         wait( m1, m2, m3, m4 );
     42        return wait(m1, m2, m3, m4);
    3843}
    3944
Note: See TracChangeset for help on using the changeset viewer.