Home | History | Annotate | Download | only in pthread_mutexattr_settype

Lines Matching defs:mutex

12   Provides errorchecking.  A thread attempting to relock this mutex without unlocking it
13 first will return with an error. A thread attempting to unlock a mutex which another
15 mutex will return with an error.
20 * 3. Create a mutex with that mutexattr object.
34 pthread_mutex_t mutex;
37 /* Initialize a mutex attributes object */
49 /* Initialize the mutex with that attribute obj. */
50 if (pthread_mutex_init(&mutex, &mta) != 0) {
51 perror("Error intializing the mutex.\n");
55 /* Unlock an already unlocked mutex. Here, an error should be returned. */
56 if (pthread_mutex_unlock(&mutex) == 0) {
58 ("Test FAILED: Did not return error when unlocking an already unlocked mutex.\n");