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.
This commit is contained in:
parent
926be5e34e
commit
d8d433894a
1 changed files with 3 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue