Lines Matching refs:mx
9 pthread_mutex_t mx[4];
40 int r= pthread_mutex_lock( &mx[2] ); assert(!r);
42 r= pthread_mutex_unlock( &mx[2] ); assert(!r);
51 r= pthread_mutex_init(&mx[0], NULL); assert(!r);
52 r= pthread_mutex_init(&mx[1], NULL); assert(!r);
53 r= pthread_mutex_init(&mx[2], NULL); assert(!r);
54 r= pthread_mutex_init(&mx[3], NULL); assert(!r);
68 /* mx is bogus */
69 r= pthread_cond_wait(&cv, (pthread_mutex_t*)(1 + (char*)&mx[0]) );
71 /* mx is not locked */
72 r= pthread_cond_wait(&cv, &mx[0]);
77 /* mx is held by someone else. */
78 r= pthread_cond_wait(&cv, &mx[2] );