Lines Matching refs:rc

121 	int rc;
123 if ((rc = pthread_mutex_lock(l)) != 0)
124 errc(1, rc, "pthread_mutex_lock");
130 int rc;
132 if ((rc = pthread_mutex_unlock(l)) != 0)
133 errc(1, rc, "pthread_mutex_unlock");
139 int rc;
141 if ((rc = pthread_cond_signal(c)) != 0)
142 errc(1, rc, "pthread_cond_signal");
148 int rc;
150 if ((rc = pthread_cond_wait(c, l)) != 0)
151 errc(1, rc, "pthread_cond_wait");
242 int rc;
253 if ((rc = pthread_mutex_init(&newfiles.mtx, NULL)) != 0)
254 errc(1, rc, "pthread_mutex_init()");
255 if ((rc = pthread_cond_init(&newfiles.wait, NULL)) != 0)
256 errc(1, rc, "pthread_cond_init()");
257 if ((rc = pthread_mutex_init(&renamedfiles.mtx, NULL)) != 0)
258 errc(1, rc, "pthread_mutex_init()");
259 if ((rc = pthread_cond_init(&renamedfiles.wait, NULL)) != 0)
260 errc(1, rc, "pthread_cond_init()");
265 if ((rc = pthread_create(&tid[0], NULL, loop_create, NULL)) != 0)
266 errc(1, rc, "pthread_create()");
267 if ((rc = pthread_create(&tid[1], NULL, loop_rename, NULL)) != 0)
268 errc(1, rc, "pthread_create()");
269 if ((rc = pthread_create(&tid[2], NULL, loop_unlink, NULL)) != 0)
270 errc(1, rc, "pthread_create()");
273 if ((rc = pthread_join(tid[i], NULL)) != 0)
274 errc(1, rc, "pthread_join(%d)", i);
277 if ((rc = pthread_mutex_destroy(&newfiles.mtx)) != 0)
278 errc(1, rc, "pthread_mutex_destroy(newfiles)");
279 if ((rc = pthread_cond_destroy(&newfiles.wait)) != 0)
280 errc(1, rc, "pthread_cond_destroy(newfiles)");
281 if ((rc = pthread_mutex_destroy(&renamedfiles.mtx)) != 0)
282 errc(1, rc, "pthread_mutex_destroy(renamedfiles)");
283 if ((rc = pthread_cond_destroy(&renamedfiles.wait)) != 0)
284 errc(1, rc, "pthread_cond_destroy(renamedfiles)");