Changeset 26fd986 for benchmark/schedint/cfa4.cfa
- Timestamp:
- Jan 21, 2020, 6:14:34 PM (5 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:
- 5518719
- Parents:
- c12869e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
benchmark/schedint/cfa4.cfa
rc12869e r26fd986 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.