source: benchmark/ctxswitch/pthreads.c @ b7d6a36

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

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

  • Property mode set to 100644
File size: 244 bytes
Line 
1#include <stdio.h>
2#include <stdlib.h>
3
4#include <sched.h>
5
6#include "bench.h"
7
8int main( int argc, char * argv[] ) {
9        BENCH_START()
10        BENCH(
11                for (size_t i = 0; i < times; i++) {
12                        sched_yield();
13                },
14                result
15        )
16        printf( "%g\n", result );
17}
Note: See TracBrowser for help on using the repository browser.