Lines Matching refs:p
67 } *p = mmap (NULL, sizeof (*p), PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); in do_test() local
68 if (p == MAP_FAILED) in do_test()
85 if (pthread_mutex_init (&p->m, &ma) != 0) in do_test()
107 if (pthread_cond_init (&p->c, &ca) != 0) in do_test()
118 if (pthread_mutex_lock (&p->m) != 0) in do_test()
124 p->var = 42; in do_test()
135 void *oldp = p; in do_test()
136 p = mmap (NULL, sizeof (*p), PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); in do_test()
138 if (p == oldp) in do_test()
145 munmap (oldp, sizeof (*p)); in do_test()
147 if (pthread_mutex_lock (&p->m) != 0) in do_test()
154 p->var = 0; in do_test()
157 if (pthread_cond_broadcast (&p->c) != 0) in do_test()
164 if (pthread_cond_signal (&p->c) != 0) in do_test()
172 if (pthread_mutex_unlock (&p->m) != 0) in do_test()
183 pthread_cond_wait (&p->c, &p->m); in do_test()
184 while (p->var != 0); in do_test()