Home | History | Annotate | Download | only in pthread_mutex_destroy

Lines Matching defs:mutex

9  *   a destroyed mutex object can be reinitialized using pthread_mutex_init()
19 pthread_mutex_t mutex;
21 /* Initialize a mutex attributes object */
22 if (pthread_mutex_init(&mutex, NULL) != 0) {
23 fprintf(stderr, "Cannot initialize mutex object\n");
27 /* Destroy the mutex attributes object */
28 if (pthread_mutex_destroy(&mutex) != 0) {
29 fprintf(stderr, "Cannot destroy the mutex object\n");
33 /* Initialize the mutex attributes object again. This shouldn't result in an error. */
34 if (pthread_mutex_init(&mutex, NULL) != 0) {