Lines Matching defs:threads
120 pthread_t *threads; ///< Array of pthreads for system workers
152 g->sysdep->threads = __cilkrts_malloc(sizeof(pthread_t) * g->total_workers);
153 CILK_ASSERT(g->sysdep->threads);
161 if (g->sysdep->threads)
162 __cilkrts_free(g->sysdep->threads);
167 Creation of worker threads:
194 // Name the threads for Advisor. They don't want a worker number.
272 // limit on the number of workers (threads) that may or ought
297 /* Create n worker threads from base..top-1
304 int status = pthread_create(&g->sysdep->threads[i],
316 // Create approximately half of the worker threads, and then become a worker
335 if (!g->sysdep->threads)
338 // Do we actually have any threads to create?
343 // We create (a rounded up) half of the threads, thread one creates the rest
346 // Create the first thread passing a different thread function, so that it creates threads itself
347 status = pthread_create(&g->sysdep->threads[0], NULL, create_threads_and_work, g->workers[0]);
355 // Now wait for the first created thread to tell us it's created all of its threads.
360 // Simply create all the threads linearly here.
383 if (!g->sysdep->threads)
396 sc_status = pthread_join(g->sysdep->threads[i], &th_status);
589 return g->sysdep->threads[i] == tid;