Mercurial > hg > CbC > CbC_xv6
comparison src/file_read.cbc @ 153:49d8aba0002a
switch use sys_pipe_read.cbc
author | anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 18 Dec 2019 15:55:22 +0900 |
parents | 06449f2ae0c7 |
children |
comparison
equal
deleted
inserted
replaced
152:d3f97de63622 | 153:49d8aba0002a |
---|---|
20 return create_readi(cbc_context, f->ip, addr, f->off, n, cbc_fileread1); | 20 return create_readi(cbc_context, f->ip, addr, f->off, n, cbc_fileread1); |
21 } | 21 } |
22 return NULL; //Error? | 22 return NULL; //Error? |
23 } | 23 } |
24 | 24 |
25 __code selectReadInstance(struct Context cbc_context, struct file* f, __code ret(int i)) { | 25 __code selectReadInstance(struct Context cbc_context, struct file* f, __code next(int i)) { |
26 if (f->readable == 0) { | 26 if (f->readable == 0) { |
27 i = -1; | 27 i = -1; |
28 goto ret(i); | 28 goto next(i); |
29 } | 29 } |
30 SysRead* read = createFileReadInstFromFile(proc->cbc_context, f); | 30 SysRead* read = createFileReadInstFromFile(proc->cbc_context, f); |
31 goto read->read(f,addr,n); | 31 goto read->read(f,addr,n); |
32 } | 32 } |
33 | 33 |