Lines Matching defs:thread
47 static struct thread {
48 pthread_t thread;
58 struct thread *t = arg;
150 DBG(("%s: creating a thread pool of %d threads\n",
163 if (pthread_create(&threads[n].thread, NULL,
168 threads[0].thread = pthread_self();
178 assert(pthread_self() == threads[0].thread);
198 if (t == threads[0].thread)
201 for (n = 1; threads[n].thread != t; n++)
204 ERR(("%s: thread[%d] caught signal %d\n", __func__, n, sig));
220 assert(pthread_self() == threads[0].thread);
231 DBG(("%s: thread[%d] died from signal %d\n", __func__, n, (int)(intptr_t)threads[n].arg));
244 assert(pthread_self() == threads[0].thread);
247 pthread_cancel(threads[n].thread);
250 pthread_join(threads[n].thread, NULL);