Changeset d6ff3ff for src/benchmark/create_pthrd.c
- Timestamp:
- Jul 13, 2017, 3:51:00 PM (7 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:
- 0764cfb, 24fc196, 3d4b23fa
- Parents:
- 35b06a8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/benchmark/create_pthrd.c
r35b06a8 rd6ff3ff 17 17 18 18 for (size_t i = 0; i < n; i++) { 19 pthread_ attr_t attr;20 if (pthread_ attr_init(&attr) < 0) {19 pthread_t thread; 20 if (pthread_create(&thread, NULL, foo, NULL) < 0) { 21 21 return 1; 22 22 } 23 if (pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED) < 0) { 24 return 1; 25 } 26 pthread_t thread; 27 if (pthread_create(&thread, &attr, foo, NULL) < 0) { 23 24 if (pthread_join( thread, NULL) < 0) { 28 25 return 1; 29 26 }
Note: See TracChangeset
for help on using the changeset viewer.