Ignore:
Timestamp:
Jan 7, 2020, 3:50:56 PM (4 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
580c11b
Parents:
846c026
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • benchmark/schedint/pthreads.c

    r846c026 rb4107c8  
    44#include "bench.h"
    55
    6 int argc;
    7 char** argv;
    86volatile int go = 0;
    97
     
    2119        go = 1;
    2220        BENCH(
    23                 for (size_t i = 0; i < n; i++) {
     21                for (size_t i = 0; i < times; i++) {
    2422                        pthread_cond_wait(&c, &m);
    2523                },
    2624                result
    2725        )
    28 
    29         printf("%g\n", result);
     26        printf( "%g\n", result );
    3027        go = 0;
    3128        pthread_mutex_unlock(&m);
     
    3936}
    4037
    41 int main(__attribute__((unused)) int argc, __attribute__((unused)) char* argv[]) {
     38int main( int argc, char * argv[] ) {
     39        BENCH_START()
    4240        pthread_t thread;
    4341        if (pthread_create(&thread, NULL, thread_main, NULL) < 0) {
     
    5048                return 1;
    5149        }
    52         return 0;
    5350}
     51
     52// Local Variables: //
     53// tab-width: 4 //
     54// End: //
Note: See TracChangeset for help on using the changeset viewer.