Ignore:
Timestamp:
Jul 14, 2017, 12:22:24 PM (7 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
4b234f0
Parents:
8cb529e
Message:

Some cleanu[ of the benchmark for pthread create

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/benchmark/create_pthrd.c

    r8cb529e reb2fe4f  
    1414                n = atoi(argv[1]);
    1515        }
    16         printf("%lu\n", n);
     16        printf("create %lu pthreads ... ", n);
    1717
    1818        for (size_t i = 0; i < n; i++) {
    1919                pthread_t thread;
    2020                if (pthread_create(&thread, NULL, foo, NULL) < 0) {
     21                        perror( "failure" );
    2122                        return 1;
    2223                }
    2324
    2425                if (pthread_join( thread, NULL) < 0) {
     26                        perror( "failure" );
    2527                        return 1;
    2628                }
    2729        }
    28         pthread_exit(NULL);
    29         return 0;
     30        printf("finish\n");
    3031}
Note: See TracChangeset for help on using the changeset viewer.