Mercurial > hg > Members > menikon > CbC_xv6
changeset 95:0ddcd561d975
fix make error
author | tobaru |
---|---|
date | Mon, 04 Nov 2019 17:24:00 +0900 |
parents | 0956648d24e5 |
children | d5c4016c65b8 |
files | src/context.h src/defs.h src/file.cbc |
diffstat | 3 files changed, 3 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/src/context.h Wed Oct 23 17:33:25 2019 +0900 +++ b/src/context.h Mon Nov 04 17:24:00 2019 +0900 @@ -24,6 +24,7 @@ #endif #ifdef XV6KERNEL +extern void* kmalloc (int order); #define calloc(a,b) kmalloc((a)*(b)) #define free(a) kfree(a) #else
--- a/src/defs.h Wed Oct 23 17:33:25 2019 +0900 +++ b/src/defs.h Mon Nov 04 17:24:00 2019 +0900 @@ -70,7 +70,6 @@ void fileclose(struct file*); struct file* filedup(struct file*); void fileinit(void); -__code cbc_fileread (struct file*, char*, int, __code (*)(int)); int fileread(struct file*, char*, int n); int filestat(struct file*, struct stat*); int filewrite(struct file*, char*, int n); @@ -121,7 +120,6 @@ int pipealloc(struct file**, struct file**); void pipeclose(struct pipe*, int); int piperead(struct pipe*, char*, int); -__code cbc_piperead(struct pipe*, char*, int, __code (*)(int)); int pipewrite(struct pipe*, char*, int); //PAGEBREAK: 16
--- a/src/file.cbc Wed Oct 23 17:33:25 2019 +0900 +++ b/src/file.cbc Mon Nov 04 17:24:00 2019 +0900 @@ -114,14 +114,14 @@ } -__code cbc_fileread (struct file *f, char *addr, int n, __code (*next)(int ret)) +__code cbc_fileread(struct file *f, char *addr, int n, __code next(int ret, ...)) { if (f->readable == 0) { goto next(-1); } if (f->type == FD_PIPE) { - goto cbc_piperead(f->pipe, addr, n, next); + piperead(f->pipe, addr, n); goto next(-1); } @@ -134,12 +134,6 @@ goto cbc_panic("fileread"); } -__code cbc_fileread_stub(struct Context* cbc_context) { - struct CbCSysFile* cbc_file = &cbc_context->data[D_CbCSysFile]->CbCSysFile; - enum Code next = cbc_context->next; - goto cbc_fileread(cbc_file->f, cbc_file->p, cbc_file->n, cbc_context->code[next]); -} - // Read from file f. int fileread (struct file *f, char *addr, int n) {