Lines Matching defs:slaves

84  * sends writeheader()'s and lists of daddr's to the slaves via pipes.
85 * The following structure defines the instruction packets sent to slaves.
105 } slaves[SLAVES+1];
146 slaves[i].tblock = (char (*)[TP_BSIZE])
148 slaves[i].req = (struct req *)slaves[i].tblock - ntrec - 1;
150 slp = &slaves[0];
240 if (++slp >= &slaves[SLAVES])
241 slp = &slaves[0];
261 if (slaves[i].sent) {
262 if (atomic(read, slaves[i].fd,
268 slaves[i].sent = 0;
317 if (slaves[f].sent) {
318 if (atomic(read, slaves[f].fd, (char *)&got, sizeof got)
323 slaves[f].sent = 0;
330 (void) close(slaves[f].fd);
332 while (wait((int *)NULL) >= 0) /* wait for any signals from slaves */
396 tslp = &slaves[SLAVES];
400 * Each of the N slaves should have requests that need to
402 * (slaves[SLAVES]) to construct request lists to be sent to
447 if (++slp >= &slaves[SLAVES])
448 slp = &slaves[0];
478 * Clear the first slaves' response. One hopes that it
630 enslave(); /* Share open tape file descriptor with slaves */
683 * proceed - handler for SIGUSR2, used to synchronize IO between the slaves.
708 if (i == slp - &slaves[0]) {
715 (slaves[i].pid = fork()) < 0)
716 quit("too many slaves, %d (recompile smaller): %s\n",
719 slaves[i].fd = cmd[1];
720 slaves[i].sent = 0;
721 if (slaves[i].pid == 0) { /* Slave starts up here */
723 (void) close(slaves[j].fd);
731 (void) atomic(write, slaves[i].fd,
732 (char *) &slaves[(i + 1) % SLAVES].pid,
733 sizeof slaves[0].pid);
744 if (slaves[i].pid > 0) {
745 (void) kill(slaves[i].pid, SIGKILL);
746 slaves[i].sent = 0;