Mercurial > hg > Members > menikon > CbC_xv6
comparison src/impl/PipeRead.cbc @ 104:9bfc4fbb5502
create PipeRead.cbc
author | anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 20 Nov 2019 20:15:12 +0900 |
parents | |
children | f1be2d5abc8a |
comparison
equal
deleted
inserted
replaced
103:bc9ce1394900 | 104:9bfc4fbb5502 |
---|---|
1 #include "../context.h"; | |
2 #interface "SysRead.h"; | |
3 | |
4 // ---- | |
5 // typedef struct PipeRead<Type, Isa> impl SysRead { | |
6 // struct CbCPipe *pipe; | |
7 // struct String *addr; | |
8 // struct Integer* i; | |
9 // } PipeRead; | |
10 // ---- | |
11 | |
12 SysRead* createPipeRead(struct Context* cbc_context) { | |
13 struct SysRead* sys_read = new SysRead(); | |
14 struct PipeRead* pipeRead = new PipeRead(); | |
15 sys_read->sys_read = (union Data*)pipeRead; | |
16 pipeRead->num = NULL; | |
17 sys_read->read = C_readPipeRead; | |
18 sys_read->ret = C_retPipeRead; | |
19 sys_read->next = C_nextPipeRead; | |
20 return sys_read; | |
21 } | |
22 __code readPipeRead(__code next(...)) { | |
23 | |
24 goto next(...); | |
25 } | |
26 | |
27 __code retPipeRead(PipeRead* cbc_sys_file, UInteger* num) { | |
28 | |
29 } | |
30 | |
31 __code nextPipeRead(...) { | |
32 | |
33 } | |
34 |