# HG changeset patch # User anatofuz # Date 1575277662 -32400 # Node ID 94ee7046d1909db3658783e7c7d5de5e2f2a9367 # Parent 822d74c14f38aa8c76b20437fd000fbb2e3ab7a7 tweak (this commit can executed) diff -r 822d74c14f38 -r 94ee7046d190 src/syscall.cbc --- a/src/syscall.cbc Mon Dec 02 13:26:02 2019 +0900 +++ b/src/syscall.cbc Mon Dec 02 18:07:42 2019 +0900 @@ -143,9 +143,15 @@ [SYS_close] =sys_close, }; +/* static enum Code cbccodes[] = { [SYS_cbc_read] = C_start_code, }; +*/ + +static __code (*cbccodes[])(__code (*)(int)) = { + [SYS_cbc_read] = cbc_read, +}; __ncode cbc_trap_return(){ return; @@ -163,7 +169,6 @@ { int num; int ret; - struct Context* cbc_context; num = proc->tf->r0; @@ -173,7 +178,8 @@ if((num >= NELEM(syscalls)) && (num <= NELEM(cbccodes)) && cbccodes[num]) { proc->cbc_arg.cbc_console_arg.num = num; - goto meta(cbc_context, cbccodes[num]); + goto (cbccodes[num])(cbc_ret); + //goto meta(&proc->cbc_context, cbccodes[num]); }