source: benchmark/ctxswitch/cfa_cor.cfa @ 172d9342

ADTarm-ehast-experimentalcleanup-dtorsenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change on this file since 172d9342 was ffe2fad, checked in by Thierry Delisle <tdelisle@…>, 6 years ago

Fixed several warnings in libcfa

  • Property mode set to 100644
File size: 424 bytes
Line 
1#include <stdio.h>
2#include <kernel.hfa>
3#include <thread.hfa>
4
5#include "bench.h"
6
7coroutine GreatSuspender {};
8
9void ?{}( GreatSuspender & this ) {
10        prime(this);
11}
12
13void main( __attribute__((unused)) GreatSuspender & this ) {
14        while( true ) {
15                suspend();
16        }
17}
18
19int main(int argc, char* argv[]) {
20        GreatSuspender s;
21
22        BENCH(
23                for (size_t i = 0; i < n; i++) {
24                        resume( s );
25                },
26                result
27        )
28
29        printf("%llu\n", result);
30}
Note: See TracBrowser for help on using the repository browser.