Ignore:
Timestamp:
Feb 20, 2020, 4:15:51 PM (6 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
6a490b2
Parents:
dca5802 (diff), 2cbfe92 (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' into relaxed_ready

File:
1 edited

Legend:

Unmodified
Added
Removed
  • benchmark/schedext/cfa1.cfa

    rdca5802 rb7d6a36  
    44#include <stdio.h>
    55
    6 #include "bench.h"
     6#include "../bench.h"
    77
    8 int argc;
    9 char** argv;
    10 volatile int go = 0;
     8monitor M {} m1;
    119
    12 monitor M {};
    13 M m1;
    14 
    15 void __attribute__((noinline)) call( M & mutex a1 ) {}
    16 
    17 int  __attribute__((noinline)) wait( M & mutex a1 ) {
    18         go = 1;
    19         BENCH(
    20                 for ( i; n ) {
    21                         waitfor(call, a1);
    22                 },
    23                 result
    24         )
    25 
    26         printf("%g\n", result);
    27         go = 0;
    28         return 0;
     10void __attribute__((noinline)) call( M & mutex p1 ) {}
     11void __attribute__((noinline)) wait( M & mutex p1 ) {
     12        for ( times ) {
     13                waitfor( call : p1 );
     14        }
    2915}
    3016
    3117thread T {};
    32 void ^?{}( T & mutex this ) {}
    3318void main( T & ) {
    34         while(go == 0) { yield(); }
    35         while(go == 1) { call(m1); }
    36 
     19        BENCH(
     20                for ( times ) { call( m1 ); },
     21                result
     22        )
     23        printf( "%g\n", result );
    3724}
    3825
    39 int main(__attribute__((unused)) int argc, __attribute__((unused)) char* argv[]) {
     26int main( int argc, char * argv[] ) {
     27        BENCH_START()
    4028        T t;
    41         return wait(m1);
     29        wait( m1 );
    4230}
     31
     32// Local Variables: //
     33// tab-width: 4 //
     34// End: //
Note: See TracChangeset for help on using the changeset viewer.