| plan 9 kernel history: overview | file list | diff list |
1990/1018/port/stream.c (diff list | history)
| 1990/1018/sys/src/9/port/stream.c:746,756 – 1990/1101/sys/src/9/port/stream.c:746,757 (short | long | prev | next) | ||
| 1990/0629 | * Decrement the reference count on a stream. If the count is * zero, free the stream. */ | |
| 1990/1101 | int | |
| 1990/0629 | streamexit(Stream *s, int locked) { Queue *q; Queue *nq; | |
| 1990/1101 | int rv; | |
| 1990/0629 | if(!locked) lock(s); | |
| 1990/1018/sys/src/9/port/stream.c:765,772 – 1990/1101/sys/src/9/port/stream.c:766,775 | ||
| 1990/0629 | s->id = s->dev = s->type = 0; } s->inuse--; | |
| 1990/1101 | rv = s->inuse; | |
| 1990/0629 | if(!locked) unlock(s); | |
| 1990/1101 | return rv; | |
| 1990/0629 | } /* | |
| 1990/1018/sys/src/9/port/stream.c:791,796 – 1990/1101/sys/src/9/port/stream.c:794,801 | ||
| 1990/1011 | for(q = s->procq; q; q = q->next){ if(q->info->close) (*q->info->close)(q->other); | |
| 1990/1101 | WR(q)->put = nullput; | |
| 1990/1011 | /* * this may be 2 streams joined device end to device end */ | |