source: benchmark/ctxswitch/cfa_thrd2.cfa @ 9e63a2b

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

update existing benchmarks for changes to bench.h, add new benchmarks in new programming languages

  • Property mode set to 100644
File size: 394 bytes
Line 
1#include <thread.hfa>
2
3#include "bench.h"
4
5volatile bool done = false;
6
7thread Fibre {};
8
9void main(__attribute__((unused)) Fibre & this) {
10        while(!done) {
11                yield();
12        }
13}
14
15int main( int argc, char * argv[] ) {
16        BENCH_START()
17        Fibre f1;
18        BENCH(
19                for ( i; times ) {
20                        yield();
21                },
22                result
23        )
24        printf( "%g\n", result );
25        done = true;
26}
27
28// Local Variables: //
29// tab-width: 4 //
30// End: //
Note: See TracBrowser for help on using the repository browser.