Lines Matching refs:rc

133 	int rc;
135 if ((rc = pthread_mutex_lock(l)) != 0)
136 errc(1, rc, "pthread_mutex_lock");
142 int rc;
144 if ((rc = pthread_mutex_unlock(l)) != 0)
145 errc(1, rc, "pthread_mutex_unlock");
151 int rc;
153 if ((rc = pthread_cond_signal(c)) != 0)
154 errc(1, rc, "pthread_cond_signal");
160 int rc;
162 if ((rc = pthread_cond_wait(c, l)) != 0)
163 errc(1, rc, "pthread_cond_wait");
249 int rc;
260 if ((rc = pthread_mutex_init(&newfiles.mtx, NULL)) != 0)
261 errc(1, rc, "pthread_mutex_init()");
262 if ((rc = pthread_cond_init(&newfiles.wait, NULL)) != 0)
263 errc(1, rc, "pthread_cond_init()");
264 if ((rc = pthread_mutex_init(&renamedfiles.mtx, NULL)) != 0)
265 errc(1, rc, "pthread_mutex_init()");
266 if ((rc = pthread_cond_init(&renamedfiles.wait, NULL)) != 0)
267 errc(1, rc, "pthread_cond_init()");
272 if ((rc = pthread_create(&tid[0], NULL, loop_create, NULL)) != 0)
273 errc(1, rc, "pthread_create()");
274 if ((rc = pthread_create(&tid[1], NULL, loop_rename, NULL)) != 0)
275 errc(1, rc, "pthread_create()");
276 if ((rc = pthread_create(&tid[2], NULL, loop_unlink, NULL)) != 0)
277 errc(1, rc, "pthread_create()");
280 if ((rc = pthread_join(tid[i], NULL)) != 0)
281 errc(1, rc, "pthread_join(%d)", i);
284 if ((rc = pthread_mutex_destroy(&newfiles.mtx)) != 0)
285 errc(1, rc, "pthread_mutex_destroy(newfiles)");
286 if ((rc = pthread_cond_destroy(&newfiles.wait)) != 0)
287 errc(1, rc, "pthread_cond_destroy(newfiles)");
288 if ((rc = pthread_mutex_destroy(&renamedfiles.mtx)) != 0)
289 errc(1, rc, "pthread_mutex_destroy(renamedfiles)");
290 if ((rc = pthread_cond_destroy(&renamedfiles.wait)) != 0)
291 errc(1, rc, "pthread_cond_destroy(renamedfiles)");