diff options
author | rsc <rsc> | 2007-08-14 18:42:34 +0000 |
---|---|---|
committer | rsc <rsc> | 2007-08-14 18:42:34 +0000 |
commit | f1f8dd91bc4e8b58972f17416b664f3a950092cd (patch) | |
tree | 51f81ac32e9ee78629d7843d2e1101b0a6c0b414 /pipe.c | |
parent | 29ff8d495c8cd67df6ee3830daea64eaa422756d (diff) | |
download | xv6-labs-f1f8dd91bc4e8b58972f17416b664f3a950092cd.tar.gz xv6-labs-f1f8dd91bc4e8b58972f17416b664f3a950092cd.tar.bz2 xv6-labs-f1f8dd91bc4e8b58972f17416b664f3a950092cd.zip |
formatting
Diffstat (limited to 'pipe.c')
-rw-r--r-- | pipe.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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; |