Changes in benchmark/schedint/upp.cc [26fd986:6e540ea]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
benchmark/schedint/upp.cc
r26fd986 r6e540ea 11 11 cond.signal(); 12 12 } 13 void __attribute__((noinline)) wait() { 13 14 int __attribute__((noinline)) wait() { 14 15 go = 1; 15 for ( size_t i = 0; i < times; i++ ) {16 cond.wait();17 }18 }19 } m;20 21 _Task T {22 void main() {23 while ( go == 0 ) { yield(); } // waiter must start first24 16 BENCH( 25 for ( size_t i = 0; i < times; i++) {26 m.call();17 for (size_t i = 0; i < times; i++) { 18 cond.wait(); 27 19 }, 28 20 result 29 21 ) 30 22 printf( "%g\n", result ); 23 go = 0; 24 return 0; 25 } 26 }; 27 28 M m; 29 30 _Task T { 31 void main() { 32 while(go == 0) { yield(); } 33 while(go == 1) { m.call(); } 34 31 35 } 32 36 }; … … 35 39 BENCH_START() 36 40 T t; 37 m.wait();41 return m.wait(); 38 42 } 39 43
Note: See TracChangeset
for help on using the changeset viewer.