ref: e5ddfdfc91bffaf0d3985493448dca44dd3b9e4f
parent: f2efde5745559524923a33049a0d22794bc03319
author: Jacob Moody <moody@posixcafe.org>
date: Sun Jun 5 08:29:50 EDT 2022
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.
--- a/sys/src/9/port/devpipe.c
+++ b/sys/src/9/port/devpipe.c
@@ -11,9 +11,7 @@
struct Pipe
{
QLock;
- Pipe *next;
int ref;
- ulong path;
Queue *q[2];
int qref[2];
};
@@ -57,6 +55,7 @@
{
Pipe *p;
Chan *c;
+ ulong path;
c = devattach('|', spec);
if(waserror()){
@@ -82,10 +81,10 @@
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;
--
⑨