Home | History | Annotate | Download | only in pthread_cond_broadcast

Lines Matching defs:thread

37 		fprintf(stderr, "[Thread 0x%p] failed to acquire the mutex\n",
42 fprintf(stderr, "[Thread 0x%p] started and locked the mutex\n",
45 fprintf(stderr, "[Thread 0x%p] is waiting for the cond\n",
53 fprintf(stderr, "[Thread 0x%p] was wakened and acquired the mutex "
57 fprintf(stderr, "[Thread 0x%p] failed to release the mutex\n",
61 fprintf(stderr, "[Thread 0x%p] released the mutex\n", (void *)self);
68 pthread_t thread[THREAD_NUM];
80 if (pthread_create(&thread[i], NULL, thr_func, NULL) != 0) {
81 fprintf(stderr, "Fail to create thread[%d]\n", i);
103 fprintf(stderr, "[Main thread] broadcast the condition\n");
106 fprintf(stderr, "[Main thread] failed to broadcast the "
112 fprintf(stderr, "[Main thread] Not all waiters were wakened\n");
115 pthread_cancel(thread[i]);
119 fprintf(stderr, "[Main thread] all waiters were wakened\n");
123 if (pthread_join(thread[i], NULL) != 0) {
124 fprintf(stderr, "Fail to join thread[%d]\n", i);