| plan 9 kernel history: overview | file list | diff list |
1990/11161/port/devpipe.c (diff list | history)
| 1990/1115/sys/src/9/port/devpipe.c:179,184 – 1990/11161/sys/src/9/port/devpipe.c:179,191 (short | long | prev | next) | ||
| 1990/1009 | */ if(streamenter(local)<0) panic("pipeattach"); | |
| 1990/11161 | } else { /* * increment the inuse count of the other * stream */ if(streamenter(local->devq->ptr)<0) panic("pipeattach2"); | |
| 1990/1009 | } unlock(p); poperror(); | |
| 1990/1115/sys/src/9/port/devpipe.c:208,226 – 1990/11161/sys/src/9/port/devpipe.c:215,220 | ||
| 1990/0227 | } void | |
| 1990/1115 |
| |
| 1990/0227 | pipeclose(Chan *c) { | |
| 1990/1009 | Stream *remote; | |
| 1990/1115/sys/src/9/port/devpipe.c:228,238 – 1990/11161/sys/src/9/port/devpipe.c:222,227 | ||
| 1990/1009 | Pipe *p; | |
| 1990/0629 | ||
| 1990/1009 | p = &pipealloc.pipe[STREAMID(c->qid)/2]; | |
| 1990/1115 |
| |
| 1990/0629 | ||
| 1990/1009 | /* | |
| 1990/1011 | * take care of associated streams | |
| 1990/1115/sys/src/9/port/devpipe.c:242,250 – 1990/11161/sys/src/9/port/devpipe.c:231,248 | ||
| 1990/1009 | streamclose(c); /* close this stream */ streamexit(remote, 0); /* release stream for other half of pipe */ | |
| 1990/0629 | } | |
| 1990/1104 |
| |
| 1990/1115 |
| |
| 1990/11161 | /* * free the structure */ if(decref(p) == 0){ lock(&pipealloc); p->next = pipealloc.free; pipealloc.free = p; unlock(&pipealloc); } if(p->ref < 0) panic("pipeexit"); | |
| 1990/0227 | } long | |