Home | History | Annotate | Download | only in pthread_cond_broadcast

Lines Matching defs:thread

9  *   When each thread unblocked as a result of pthread_cond_signal()
10 * returns from its call to pthread_cond_timedwait(), the thread shall
43 fprintf(stderr, "[Thread 0x%p] failed to acquire the mutex\n",
47 fprintf(stderr, "[Thread 0x%p] started and locked the mutex\n",
58 fprintf(stderr, "[Thread 0x%p] is waiting for the cond for at "
62 fprintf(stderr, "[Thread 0x%p] pthread_cond_wait returned %d\n",
68 fprintf(stderr, "[Thread 0x%p] should not be able to lock the "
73 fprintf(stderr, "[Thread 0x%p] was wakened and acquired the "
78 fprintf(stderr, "[Thread 0x%p] failed to release the mutex\n",
83 fprintf(stderr, "[Thread 0x%p] released the mutex\n", (void *)self);
90 pthread_t thread[THREAD_NUM];
102 if (pthread_create(&thread[i], NULL, thr_func, NULL) != 0) {
103 fprintf(stderr, "Fail to create thread[%d]\n", i);
120 fprintf(stderr, "[Main thread] broadcast the condition\n");
123 fprintf(stderr, "[Main thread] failed to broadcast "
129 fprintf(stderr, "[Main thread] Not all waiters were wakened\n");
131 pthread_cancel(thread[i]);
135 fprintf(stderr, "[Main thread] all waiters were wakened\n");
139 if (pthread_join(thread[i], NULL) != 0) {
140 fprintf(stderr, "Fail to join thread[%d]\n", i);