Lines Matching refs:threads
1318 pthread_t *threads = NULL;
1322 threads = calloc(nthreads - 1, sizeof(*threads));
1323 if (!threads)
1328 * Start (nthreads - 1) threads - the main thread is going to
1332 if (pthread_create(&threads[i], NULL,
1337 * threads do the job. In the worst case the
1341 threads[i] = self;
1348 /* Now wait for all threads to finish. */
1350 /* Skip threads that failed to be created. */
1351 if (pthread_equal(threads[i], self))
1353 pthread_join(threads[i], NULL);
1355 free(threads);