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