summaryrefslogtreecommitdiff
path: root/pipe.c
diff options
context:
space:
mode:
authorrsc <rsc>2007-08-14 18:42:34 +0000
committerrsc <rsc>2007-08-14 18:42:34 +0000
commitf1f8dd91bc4e8b58972f17416b664f3a950092cd (patch)
tree51f81ac32e9ee78629d7843d2e1101b0a6c0b414 /pipe.c
parent29ff8d495c8cd67df6ee3830daea64eaa422756d (diff)
downloadxv6-labs-f1f8dd91bc4e8b58972f17416b664f3a950092cd.tar.gz
xv6-labs-f1f8dd91bc4e8b58972f17416b664f3a950092cd.tar.bz2
xv6-labs-f1f8dd91bc4e8b58972f17416b664f3a950092cd.zip
formatting
Diffstat (limited to 'pipe.c')
-rw-r--r--pipe.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pipe.c b/pipe.c
index b866a0e..a207df1 100644
--- a/pipe.c
+++ b/pipe.c
@@ -45,6 +45,7 @@ pipe_alloc(struct file **f0, struct file **f1)
(*f1)->writable = 1;
(*f1)->pipe = p;
return 0;
+
oops:
if(p)
kfree((char*) p, PAGE);
@@ -78,6 +79,7 @@ pipe_close(struct pipe *p, int writable)
kfree((char*) p, PAGE);
}
+//PAGEBREAK: 20
int
pipe_write(struct pipe *p, char *addr, int n)
{
@@ -117,7 +119,6 @@ pipe_read(struct pipe *p, char *addr, int n)
}
sleep(&p->readp, &p->lock);
}
-
for(i = 0; i < n; i++){
if(p->readp == p->writep)
break;