Lines Matching refs:rc

118 	int rc;
120 if ((rc = pthread_mutex_lock(l)) != 0)
121 errc(1, rc, "pthread_mutex_lock");
127 int rc;
129 if ((rc = pthread_mutex_unlock(l)) != 0)
130 errc(1, rc, "pthread_mutex_unlock");
136 int rc;
138 if ((rc = pthread_cond_signal(c)) != 0)
139 errc(1, rc, "pthread_cond_signal");
145 int rc;
147 if ((rc = pthread_cond_wait(c, l)) != 0)
148 errc(1, rc, "pthread_cond_wait");
234 int rc;
246 if ((rc = pthread_mutexattr_setprotocol(&attr, PTHREAD_PRIO_INHERIT)) != 0)
247 errc(1, rc, "PTHREAD_PRIO_INHERIT");
249 if ((rc = pthread_mutex_init(&newfiles.mtx, pattr)) != 0)
250 errc(1, rc, "pthread_mutex_init()");
251 if ((rc = pthread_cond_init(&newfiles.wait, NULL)) != 0)
252 errc(1, rc, "pthread_cond_init()");
253 if ((rc = pthread_mutex_init(&renamedfiles.mtx, NULL)) != 0)
254 errc(1, rc, "pthread_mutex_init()");
255 if ((rc = pthread_cond_init(&renamedfiles.wait, NULL)) != 0)
256 errc(1, rc, "pthread_cond_init()");
261 if ((rc = pthread_create(&tid[0], NULL, loop_create, NULL)) != 0)
262 errc(1, rc, "pthread_create()");
263 if ((rc = pthread_create(&tid[1], NULL, loop_rename, NULL)) != 0)
264 errc(1, rc, "pthread_create()");
265 if ((rc = pthread_create(&tid[2], NULL, loop_unlink, NULL)) != 0)
266 errc(1, rc, "pthread_create()");
269 if ((rc = pthread_join(tid[i], NULL)) != 0)
270 errc(1, rc, "pthread_join(%d)", i);
273 if ((rc = pthread_mutex_destroy(&newfiles.mtx)) != 0)
274 errc(1, rc, "pthread_mutex_destroy(newfiles)");
275 if ((rc = pthread_cond_destroy(&newfiles.wait)) != 0)
276 errc(1, rc, "pthread_cond_destroy(newfiles)");
277 if ((rc = pthread_mutex_destroy(&renamedfiles.mtx)) != 0)
278 errc(1, rc, "pthread_mutex_destroy(renamedfiles)");
279 if ((rc = pthread_cond_destroy(&renamedfiles.wait)) != 0)
280 errc(1, rc, "pthread_cond_destroy(renamedfiles)");