source: benchmark/ctxswitch/cfa_cor.cfa@ 3e93c00

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 3e93c00 was dc33b5b, checked in by Peter A. Buhr <pabuhr@…>, 6 years ago

update benchmarks and add benchmarks for qthreads

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