Changes in benchmark/schedext/cfa2.cfa [26fd986:2316525]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
benchmark/schedext/cfa2.cfa
r26fd986 r2316525 4 4 #include <stdio.h> 5 5 6 #include "../bench.h" 6 #include "bench.h" 7 8 volatile int go = 0; 7 9 8 10 monitor M {} m1, m2; 9 11 10 12 void __attribute__((noinline)) call( M & mutex p1, M & mutex p2 ) {} 13 11 14 void __attribute__((noinline)) wait( M & mutex p1, M & mutex p2 ) { 15 go = 1; 12 16 for ( times ) { 13 17 waitfor( call : p1, p2 ); 14 18 } 19 go = 0; 15 20 } 21 16 22 thread T {}; 17 23 void main( T & ) { 24 while( go == 0 ) { yield(); } 18 25 BENCH( 19 for ( times ) { 20 call( m1, m2 ); 21 }, 26 while ( go == 1 ) { call( m1, m2 ); }, 22 27 result 23 28 )
Note: See TracChangeset
for help on using the changeset viewer.