Lines Matching defs:threads
186 thread *next; /* for list of all launched threads */
189 /* list of threads launched but not joined, count of threads exited but not
194 0 /* number of threads exited but not joined */
196 local thread *threads = NULL; /* list of extant threads */
212 /* find this thread in the threads list by matching the thread id */
215 prior = &(threads);
226 if (threads != match) {
228 match->next = threads;
229 threads = match;
232 /* update the count of threads to be joined and alert join_all() */
236 /* all threads go through this routine so that just before the thread exits,
237 it marks itself as done in the threads list and alerts join_all() so that
258 /* not all POSIX implementations create threads as joinable by default, so that
287 /* put the thread in the threads list for join_all() */
289 th->next = threads;
290 threads = th;
304 /* find the thread in the threads list */
306 prior = &(threads);
323 /* This implementation of join_all() only attempts to join threads that have
325 threads, this is faster than waiting for some random thread to exit while a
326 bunch of other threads have already exited. */
332 /* grab the threads list and initialize the joined count */
336 /* do until threads list is empty */
337 while (threads != NULL) {
342 prior = &(threads);
351 /* join the thread (will be almost immediate), remove from the threads
361 /* let go of the threads list and return the number of threads joined */