Changes in benchmark/schedint/cfa4.cfa [6e540ea:2316525]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
benchmark/schedint/cfa4.cfa
r6e540ea r2316525 7 7 8 8 volatile int go = 0; 9 condition c; 10 monitor M {} m1, m2, m3, m4; 9 11 10 condition c; 11 monitor M {}; 12 M m1, m2, m3, m4; 13 14 void __attribute__((noinline)) call( M & mutex a1, M & mutex a2, M & mutex a3, M & mutex a4 ) { 15 signal(c); 12 void __attribute__((noinline)) call( M & mutex p1, M & mutex p2, M & mutex p3, M & mutex p4 ) { 13 signal( c ); 16 14 } 17 15 18 int __attribute__((noinline)) wait( M & mutex a1, M & mutex a2, M & mutex a3, M & mutex a4 ) {16 void __attribute__((noinline)) wait( M & mutex p1, M & mutex p2, M & mutex p3, M & mutex p4 ) { 19 17 go = 1; 18 for ( times ) { 19 wait( c ); 20 } 21 go = 0; 22 } 23 24 thread T {}; 25 void main( T & ) { 26 while ( go == 0 ) { yield(); } 20 27 BENCH( 21 for ( i; times ) { 22 wait(c); 23 }, 28 while ( go == 1 ) { call( m1, m2, m3, m4 ); }, 24 29 result 25 30 ) 26 31 printf( "%g\n", result ); 27 go = 0;28 return 0;29 }30 31 thread T {};32 void ^?{}( T & mutex this ) {}33 void main( T & ) {34 while(go == 0) { yield(); }35 while(go == 1) { call(m1, m2, m3, m4); }36 37 32 } 38 33 … … 40 35 BENCH_START() 41 36 T t; 42 return wait(m1, m2, m3, m4);37 wait( m1, m2, m3, m4 ); 43 38 } 44 39
Note: See TracChangeset
for help on using the changeset viewer.