Changes in src/benchmark/create_pthrd.c [d6ff3ff:5013c62]
- File:
-
- 1 edited
-
src/benchmark/create_pthrd.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/benchmark/create_pthrd.c
rd6ff3ff r5013c62 17 17 18 18 for (size_t i = 0; i < n; i++) { 19 pthread_ t thread;20 if (pthread_ create(&thread, NULL, foo, NULL) < 0) {19 pthread_attr_t attr; 20 if (pthread_attr_init(&attr) < 0) { 21 21 return 1; 22 22 } 23 24 if (pthread_join( thread, NULL) < 0) { 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) { 25 28 return 1; 26 29 }
Note:
See TracChangeset
for help on using the changeset viewer.