#include "context.h" #interface "SyscallEntry.h" #interface "ReadSyscall.h" // ---- // typedef struct ReadSyscallEntry impl SyscallEntry { // __code next(....); // } ReadSyscallEntry; // ---- SyscallEntry* createReadSyscallEntry(struct Context* cbc_context) { struct SyscallEntry* syscall_entry = new SyscallEntry(); struct ReadSyscallEntry* read_syscall_entry = new ReadSyscallEntry(); syscall_entry->syscall_entry = (union Data*)read_syscall_entry; syscall_entry->exec = C_execReadSyscallEntry; return syscall_entry; } extern ReadSyscall* createReadSyscallImpl(struct Context*); __code execReadSyscallEntry(struct ReadSyscallEntry* syscall_entry, __code next(...)) { ReadSyscall* read_syscall = createReadSyscallImpl(cbc_context); goto read_syscall->fileread(next); }