Mercurial > hg > Members > tobaru > CbC_xv6
changeset 104:9bfc4fbb5502
create PipeRead.cbc
author | anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 20 Nov 2019 20:15:12 +0900 |
parents | bc9ce1394900 |
children | f1be2d5abc8a |
files | src/gearsTools/trans_impl.pl src/impl/PipeRead.cbc src/impl/PipeRead.h |
diffstat | 3 files changed, 40 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gearsTools/trans_impl.pl Tue Nov 19 15:21:32 2019 +0900 +++ b/src/gearsTools/trans_impl.pl Wed Nov 20 20:15:12 2019 +0900 @@ -13,7 +13,7 @@ my $impl_file = shift or die 'require impl file'; my $impl_ir = Gears::Util->parse_code_verbose($impl_file); -my $interface_file = Gears::Util->find_header($impl_ir->{isa},"$FindBin::Bin"); +my $interface_file = Gears::Util->find_header($impl_ir->{isa},"$FindBin::Bin/../"); my $inter_ir = Gears::Util->parse_code_verbose($interface_file);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/impl/PipeRead.cbc Wed Nov 20 20:15:12 2019 +0900 @@ -0,0 +1,34 @@ +#include "../context.h"; +#interface "SysRead.h"; + +// ---- +// typedef struct PipeRead<Type, Isa> impl SysRead { +// struct CbCPipe *pipe; +// struct String *addr; +// struct Integer* i; +// } PipeRead; +// ---- + +SysRead* createPipeRead(struct Context* cbc_context) { + struct SysRead* sys_read = new SysRead(); + struct PipeRead* pipeRead = new PipeRead(); + sys_read->sys_read = (union Data*)pipeRead; + pipeRead->num = NULL; + sys_read->read = C_readPipeRead; + sys_read->ret = C_retPipeRead; + sys_read->next = C_nextPipeRead; + return sys_read; +} +__code readPipeRead(__code next(...)) { + + goto next(...); +} + +__code retPipeRead(PipeRead* cbc_sys_file, UInteger* num) { + +} + +__code nextPipeRead(...) { + +} +