Changeset 4f7b418 for benchmark/schedint/cfa4.cfa
- Timestamp:
- Feb 4, 2020, 11:29:22 AM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 52142c2, 9f575ea, bdfc032
- Parents:
- 09f357ec (diff), e56eb455 (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
benchmark/schedint/cfa4.cfa
r09f357ec r4f7b418 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 condition c; 10 11 monitor M {} m1, m2, m3, m4; … … 13 14 signal( c ); 14 15 } 15 16 16 void __attribute__((noinline)) wait( M & mutex p1, M & mutex p2, M & mutex p3, M & mutex p4 ) { 17 17 go = 1; … … 19 19 wait( c ); 20 20 } 21 go = 0;22 21 } 23 22 24 23 thread T {}; 25 24 void main( T & ) { 26 while ( go == 0 ) { yield(); } 25 while ( go == 0 ) { yield(); } // waiter must start first 27 26 BENCH( 28 while ( go == 1) { call( m1, m2, m3, m4 ); },27 for ( times ) { call( m1, m2, m3, m4 ); }, 29 28 result 30 29 )
Note: See TracChangeset
for help on using the changeset viewer.