| plan 9 kernel history: overview | file list | diff list |
1990/0629/port/devpipe.c (diff list | history)
| 1990/0617/sys/src/9/port/devpipe.c:32,37 – 1990/0629/sys/src/9/port/devpipe.c:32,39 (short | long | prev | next) | ||
| 1990/0227 | pipeattach(char *spec) { Chan *c; | |
| 1990/0629 | int i; | |
| 1990/0227 | /* * make the first stream */ | |
| 1990/0617/sys/src/9/port/devpipe.c:59,66 – 1990/0629/sys/src/9/port/devpipe.c:61,79 | ||
| 1990/0227 | /* * attach it to the first */ | |
| 1990/0629 | c->stream->devq->ptr = (Stream *)nc->stream; nc->stream->devq->ptr = (Stream *)c->stream; | |
| 1990/0227 | c->stream->devq->other->next = nc->stream->devq; nc->stream->devq->other->next = c->stream->devq; | |
| 1990/0629 | /* * up the inuse count of each stream to reflect the * pointer from the other stream. */ if(streamenter(c->stream)<0) panic("pipeattach"); if(streamenter(nc->stream)<0) panic("pipeattach"); | |
| 1990/0227 | return nc; } | |
| 1990/0617/sys/src/9/port/devpipe.c:110,116 – 1990/0629/sys/src/9/port/devpipe.c:123,139 | ||
| 1990/0227 | void pipeclose(Chan *c) { | |
| 1990/0629 | Stream *other; other = (Stream *)c->stream->devq->ptr; if(waserror()){ streamexit(other, 0); nexterror(); } streamclose(c); /* close this stream */ streamexit(other, 0); /* release stream for other half of pipe */ poperror(); | |
| 1990/0227 | } long | |
| 1990/0617/sys/src/9/port/devpipe.c:164,177 – 1990/0629/sys/src/9/port/devpipe.c:187,193 | ||
| 1990/0227 | static void pipeoput(Queue *q, Block *bp) { | |
| 1990/0403 |
| |
| 1990/0227 |
| |
| 1990/0629 | PUTNEXT(q, bp); | |
| 1990/0227 | } /* | |
| 1990/0617/sys/src/9/port/devpipe.c:193,221 – 1990/0629/sys/src/9/port/devpipe.c:209,215 | ||
| 1990/0227 | * send a hangup */ q = q->other; | |
| 1990/0629 | bp = allocb(0); bp->type = M_HANGUP; PUTNEXT(q, bp); | |
| 1990/0227 | } | |