Changeset 9236060 for src/benchmark/create_pthrd.c
- Timestamp:
- Aug 14, 2017, 2:03:39 PM (8 years ago)
- 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:
- 74b007ba
- Parents:
- fd344aa (diff), 54cd58b0 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/benchmark/create_pthrd.c
rfd344aa r9236060 14 14 n = atoi(argv[1]); 15 15 } 16 printf(" %lu\n", n);16 printf("create %lu pthreads ... ", n); 17 17 18 18 for (size_t i = 0; i < n; i++) { 19 19 pthread_t thread; 20 20 if (pthread_create(&thread, NULL, foo, NULL) < 0) { 21 perror( "failure" ); 21 22 return 1; 22 23 } 23 24 24 25 if (pthread_join( thread, NULL) < 0) { 26 perror( "failure" ); 25 27 return 1; 26 28 } 27 29 } 28 pthread_exit(NULL); 29 return 0; 30 printf("finish\n"); 30 31 }
Note:
See TracChangeset
for help on using the changeset viewer.