diff options
author | Jacob Moody <moody@posixcafe.org> | 2022-06-05 12:29:50 +0000 |
---|---|---|
committer | Jacob Moody <moody@posixcafe.org> | 2022-06-05 12:29:50 +0000 |
commit | d8d433894a706ec65384bd8a18630d18912f0f78 (patch) | |
tree | d2b01bc5dda5888dfbc23a98f439ca10ecf742e3 /sys | |
parent | 926be5e34eb633bc3e22b013705f5474d21aa735 (diff) |
kernel: cleanup unused fields from devpipe
We don't need to multiply session path by 2, the definition
for NETQID is:
Meaning we don't need to save room between session paths
for individual Qid paths. This doubles the amount of
pipe sessions we can have before a wrap.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/src/9/port/devpipe.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/src/9/port/devpipe.c b/sys/src/9/port/devpipe.c index 60c6edd13..8611681a4 100644 --- a/sys/src/9/port/devpipe.c +++ b/sys/src/9/port/devpipe.c @@ -11,9 +11,7 @@ typedef struct Pipe Pipe; struct Pipe { QLock; - Pipe *next; int ref; - ulong path; Queue *q[2]; int qref[2]; }; @@ -57,6 +55,7 @@ pipeattach(char *spec) { Pipe *p; Chan *c; + ulong path; c = devattach('|', spec); if(waserror()){ @@ -82,10 +81,10 @@ pipeattach(char *spec) poperror(); lock(&pipealloc); - p->path = ++pipealloc.path; + path = ++pipealloc.path; unlock(&pipealloc); - mkqid(&c->qid, NETQID(2*p->path, Qdir), 0, QTDIR); + mkqid(&c->qid, NETQID(path, Qdir), 0, QTDIR); c->aux = p; c->dev = 0; return c; |