Home | History | Annotate | Download | only in pthread_mutexattr_settype

Lines Matching defs:mutex

12  *  This type of mutex doesn't detect deadlock.  So a thread attempting to relock this mutex
13 * without unlocking it first will not return an error. Attempting to unlock a mutex locked
14 * by a different thread results in undefined behavior. Attemping to unlock an unlocked mutex
20 * 3. Create a mutex with that mutexattr object.
21 * 4. Lock the mutex, then relock it. Expect dead lock. Timer will be use
43 pthread_mutex_t mutex;
47 /* Initialize a mutex attributes object */
59 /* Initialize the mutex with that attribute obj. */
60 if (pthread_mutex_init(&mutex, &mta) != 0) {
61 perror("Error initializing the mutex.\n");
65 ret = pthread_mutex_lock(&mutex);
75 ret = pthread_mutex_lock(&mutex);
77 printf("Relock the mutex did not get deadlock\n");