Changes in benchmark/schedext/cfa2.cfa [2316525:cca568e]
- File:
-
- 1 edited
-
benchmark/schedext/cfa2.cfa (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
benchmark/schedext/cfa2.cfa
r2316525 rcca568e 8 8 volatile int go = 0; 9 9 10 monitor M {} m1, m2; 10 monitor M {}; 11 M m1, m2; 11 12 12 void __attribute__((noinline)) call( M & mutex p1, M & mutex p2 ) {}13 void __attribute__((noinline)) call( M & mutex a1, M & mutex a2 ) {} 13 14 14 void __attribute__((noinline)) wait( M & mutex p1, M & mutex p2 ) {15 int __attribute__((noinline)) wait( M & mutex a1, M & mutex a2 ) { 15 16 go = 1; 16 for ( times ) {17 waitfor( call : p1, p2);17 for ( i; times ) { 18 waitfor(call : a1, a2); 18 19 } 19 20 go = 0; 21 return 0; 20 22 } 21 23 22 24 thread T {}; 25 void ^?{}( T & mutex this ) {} 23 26 void main( T & ) { 24 while( go == 0) { yield(); }27 while(go == 0) { yield(); } 25 28 BENCH( 26 while ( go == 1 ) { call( m1, m2); },29 while(go == 1) { call(m1, m2); }, 27 30 result 28 31 ) … … 33 36 BENCH_START() 34 37 T t; 35 wait( m1, m2 );38 return wait( m1, m2 ); 36 39 } 37 40
Note:
See TracChangeset
for help on using the changeset viewer.