Lines Matching defs:threads
22 /* This defines the number of threads to spawn. */
25 /* Global barrier type to control synchronization between threads. */
29 static pthread_t threads[THREADCOUNT];
41 if (pthread_equal (threads[tid], pthread_self ()))
64 /* Encapsulate the synchronization of the threads. Perform a barrier before
72 printf ("All threads entering compute region\n");
77 printf ("All threads outputting results\n");
92 /* Create the worker threads (main). */
93 printf ("Spawning worker threads\n");
98 err = pthread_create (&threads[tid], NULL, thread_function,
106 /* Wait for the threads to complete then exit. */
108 pthread_join (threads[tid], NULL);