Home | History | Annotate | Download | only in pthread_setcanceltype

Lines Matching defs:mutex

12  * 1. Setup a mutex and lock it in main()
16 * 4. Make the thread block on the locked mutex
17 * 5. Send out a thread cancel request to the new thread, and unlock the mutex allowing the
39 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; /* Mutex */
59 /* Lock the mutex. It should have already been locked in main, so the thread
61 if (pthread_mutex_lock(&mutex) != 0) {
89 /* Lock the mutex */
90 if (pthread_mutex_lock(&mutex) != 0) {
112 /* Cancel request has been sent, unlock the mutex */
113 if (pthread_mutex_unlock(&mutex) != 0) {