Lines Matching refs:args
198 struct thr_args *args = (struct thr_args *)arg;
206 if (fwrite(args->buf, 1, args->rsz, args->out) != args->rsz) {
218 while ((nread = (*args->readf)(args->in, args->buf)) != 0) {
223 if (fwrite(args->buf, 1, nread, args->out) != nread) {
224 if (ferror(args->out) && errno != EPIPE)
232 (void) fclose(args->out);
233 free(args->buf);
234 free(args);
246 struct thr_args *args;
249 if ((args = malloc(sizeof (struct thr_args))) == NULL) {
253 args->in = in;
254 args->out = out;
255 args->buf = buf;
256 args->rsz = rsz;
257 args->readf = readf;
259 if (pthread_create(&thr, NULL, splice_thr, args) != 0) {