source:
benchmark/ctxswitch/cfa_cor.cfa
@
830edc6
Last change on this file since 830edc6 was dfda49f, checked in by , 5 years ago | |
---|---|
|
|
File size: 354 bytes |
Rev | Line | |
---|---|---|
[73abe95] | 1 | #include <kernel.hfa> |
2 | #include <thread.hfa> | |
[de90452] | 3 | |
[dfda49f] | 4 | #include "../bench.h" |
[de90452] | 5 | |
[dfda49f] | 6 | coroutine C {}; |
[2316525] | 7 | void main( __attribute__((unused)) C & ) { |
[dfda49f] | 8 | for () { |
[427854b] | 9 | suspend; |
[de90452] | 10 | } |
11 | } | |
[b4107c8] | 12 | int main( int argc, char * argv[] ) { |
[dfda49f] | 13 | C c; |
[b4107c8] | 14 | BENCH_START() |
[034165a] | 15 | BENCH( |
[2316525] | 16 | for ( times ) { |
17 | resume( c ); | |
[b7170a64] | 18 | }, |
[034165a] | 19 | result |
20 | ) | |
[b4107c8] | 21 | printf( "%g\n", result ); |
[dc33b5b] | 22 | } |
[b4107c8] | 23 | |
24 | // Local Variables: // | |
25 | // tab-width: 4 // | |
26 | // End: // |
Note: See TracBrowser
for help on using the repository browser.