Changes in src/benchmark/create_pthrd.c [eb2fe4f:d6ff3ff]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/benchmark/create_pthrd.c
reb2fe4f rd6ff3ff 14 14 n = atoi(argv[1]); 15 15 } 16 printf(" create %lu pthreads ...", n);16 printf("%lu\n", 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" );22 21 return 1; 23 22 } 24 23 25 24 if (pthread_join( thread, NULL) < 0) { 26 perror( "failure" );27 25 return 1; 28 26 } 29 27 } 30 printf("finish\n"); 28 pthread_exit(NULL); 29 return 0; 31 30 }
Note: See TracChangeset
for help on using the changeset viewer.