source: benchmark/ctxswitch/cfa_cor_then.cfa@ 50cfa99

ADT arm-eh ast-experimental enum forall-pointer-decay jacob/cs343-translation jenkins-sandbox new-ast new-ast-unique-expr pthread-emulation qualifiedEnum
Last change on this file since 50cfa99 was b4107c8, checked in by Peter A. Buhr <pabuhr@…>, 6 years ago

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

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