Mercurial > hg > Members > tobaru > CbC_xv6
comparison src/sys_close_impl.cbc @ 156:18a432ac4f9f
add Syscall close
author | tobaru |
---|---|
date | Fri, 20 Dec 2019 16:05:31 +0900 |
parents | |
children | e8b76f16de1a |
comparison
equal
deleted
inserted
replaced
119:94ee7046d190 | 156:18a432ac4f9f |
---|---|
1 #include "../context.h"; | |
2 #interface "SysClose.h"; | |
3 | |
4 // ---- | |
5 // typedef struct SysCloseImpl<Type, Isa> impl SysClose { | |
6 // | |
7 // } SysCloseImpl; | |
8 // ---- | |
9 | |
10 SysClose* createSysCloseImpl(struct Context* cbc_context) { | |
11 struct SysClose* int fd; | |
12 = new SysClose(); | |
13 struct SysCloseImpl* sys_close_impl = new SysCloseImpl(); | |
14 int fd; | |
15 -> int fd; | |
16 = (union Data*)sys_close_impl; | |
17 int fd; | |
18 ->close = C_closeSysCloseImpl; | |
19 return int fd; | |
20 ; | |
21 } | |
22 __code closeSysCloseImpl(int fd, struct file *f, __code next(...)) { | |
23 | |
24 goto next(...); | |
25 } |