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