source: benchmark/ctxswitch/cfa_cor_then.cfa @ dfa4360

ADTarm-ehast-experimentalenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change on this file since dfa4360 was 2316525, checked in by Peter A. Buhr <pabuhr@…>, 4 years ago

update benchmarks for concurrency paper

  • Property mode set to 100644
File size: 427 bytes
Line 
1#include <kernel.hfa>
2#include <thread.hfa>
3
4#include "bench.h"
5
6void noOp(void) {}
7
8coroutine C {} c;
9
10void ?{}( C & this ) {
11        prime(this);
12}
13
14void main( __attribute__((unused)) C & this ) {
15        while () {
16                suspend_then(noOp);
17        }
18}
19
20int main( int argc, char * argv[] ) {
21        BENCH_START()
22        BENCH(
23                for ( times ) {
24                        resume( c );
25                },
26                result
27        )
28        printf( "%g\n", result );
29}
30
31// Local Variables: //
32// tab-width: 4 //
33// End: //
Note: See TracBrowser for help on using the repository browser.