Home | History | Annotate | Download | only in pthread_cond_timedwait

Lines Matching defs:mutex

28 	pthread_mutex_t mutex;
42 if (pthread_mutex_lock(&td.mutex) != 0) {
43 fprintf(stderr, "Thread1 failed to acquire the mutex\n");
57 rc = pthread_cond_timedwait(&td.cond, &td.mutex, &timeout);
75 if (pthread_mutex_init(&td.mutex, NULL) != 0) {
76 fprintf(stderr, "Fail to initialize mutex\n");
99 /* Make sure pthread_cond_timedwait released and re-acquired the mutex
101 rc = pthread_mutex_trylock(&td.mutex);
104 "Test FAILED: Did not re-acquire mutex after timedout out call to pthread_cond_timedwait\n");
108 if (pthread_mutex_unlock(&td.mutex) != 0) {
109 fprintf(stderr, "Main failed to release mutex\n");