Mercurial > hg > Members > tobaru > CbC_xv6
view src/sys_close_impl.cbc @ 156:18a432ac4f9f
add Syscall close
author | tobaru |
---|---|
date | Fri, 20 Dec 2019 16:05:31 +0900 |
parents | |
children | e8b76f16de1a |
line wrap: on
line source
#include "../context.h"; #interface "SysClose.h"; // ---- // typedef struct SysCloseImpl<Type, Isa> impl SysClose { // // } SysCloseImpl; // ---- SysClose* createSysCloseImpl(struct Context* cbc_context) { struct SysClose* int fd; = new SysClose(); struct SysCloseImpl* sys_close_impl = new SysCloseImpl(); int fd; -> int fd; = (union Data*)sys_close_impl; int fd; ->close = C_closeSysCloseImpl; return int fd; ; } __code closeSysCloseImpl(int fd, struct file *f, __code next(...)) { goto next(...); }