Changeset 7030dab for benchmark/ctxswitch/cfa_cor.cfa
- Timestamp:
- Apr 6, 2020, 4:46:28 PM (6 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum, stuck-waitfor-destruct
- Children:
- e3bc51c
- Parents:
- 71d6bd8 (diff), 057298e (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
-
benchmark/ctxswitch/cfa_cor.cfa (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
benchmark/ctxswitch/cfa_cor.cfa
r71d6bd8 r7030dab 2 2 #include <thread.hfa> 3 3 4 #include " bench.h"4 #include "../bench.h" 5 5 6 coroutine GreatSuspender {}; 7 8 void ?{}( GreatSuspender & this ) { 9 prime(this); 10 } 11 12 void main( __attribute__((unused)) GreatSuspender & this ) { 13 while( true ) { 14 suspend(); 6 coroutine C {}; 7 void main( __attribute__((unused)) C & ) { 8 for () { 9 suspend; 15 10 } 16 11 } 17 18 int main(int argc, char* argv[]) { 19 GreatSuspender s; 20 12 int main( int argc, char * argv[] ) { 13 C c; 14 BENCH_START() 21 15 BENCH( 22 for ( i; n) {23 resume( s);16 for ( times ) { 17 resume( c ); 24 18 }, 25 19 result 26 20 ) 21 printf( "%g\n", result ); 22 } 27 23 28 printf("%g\n", result); 29 } 24 // Local Variables: // 25 // tab-width: 4 // 26 // End: //
Note:
See TracChangeset
for help on using the changeset viewer.