From abf847a083888bbed4260ecacf849ea19f23e810 Mon Sep 17 00:00:00 2001 From: Frans Kaashoek Date: Tue, 31 Jan 2017 17:47:16 -0500 Subject: Start of an experiment to remove the use of gs for cpu local variables. --- pipe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pipe.c') diff --git a/pipe.c b/pipe.c index a9f471e..e9abe7f 100644 --- a/pipe.c +++ b/pipe.c @@ -83,7 +83,7 @@ pipewrite(struct pipe *p, char *addr, int n) acquire(&p->lock); for(i = 0; i < n; i++){ while(p->nwrite == p->nread + PIPESIZE){ //DOC: pipewrite-full - if(p->readopen == 0 || proc->killed){ + if(p->readopen == 0 || myproc()->killed){ release(&p->lock); return -1; } @@ -104,7 +104,7 @@ piperead(struct pipe *p, char *addr, int n) acquire(&p->lock); while(p->nread == p->nwrite && p->writeopen){ //DOC: pipe-empty - if(proc->killed){ + if(myproc()->killed){ release(&p->lock); return -1; } -- cgit v1.2.3