feat: Additional syscalls

main
Sean McBride 4 years ago
parent 46f597a78c
commit c97ab91ff2

@ -723,16 +723,18 @@ inner_syscall_handler(int32_t n, int32_t a, int32_t b, int32_t c, int32_t d, int
return wasm_mmap(a, b, c, d, e, f); return wasm_mmap(a, b, c, d, e, f);
case SYS_GET_TIME: case SYS_GET_TIME:
return wasm_get_time(a, b); return wasm_get_time(a, b);
case SYS_READV:
return wasm_readv(a, b, c);
case SYS_MUNMAP: case SYS_MUNMAP:
case SYS_IOCTL: case SYS_IOCTL:
case SYS_SET_THREAD_AREA: case SYS_SET_THREAD_AREA:
case SYS_SET_TID_ADDRESS: case SYS_SET_TID_ADDRESS:
case SYS_BRK: case SYS_BRK:
case SYS_MADVISE:
/* Note: These are called, but are unimplemented and fail silently */ /* Note: These are called, but are unimplemented and fail silently */
return 0; return 0;
case SYS_RT_SIGACTION: case SYS_RT_SIGACTION:
case SYS_RT_SIGPROGMASK: case SYS_RT_SIGPROGMASK:
case SYS_MADVISE:
default: default:
/* This is a general catch all for the other functions below */ /* This is a general catch all for the other functions below */
debuglog("Call to unknown or implemented syscall %d\n", n); debuglog("Call to unknown or implemented syscall %d\n", n);
@ -740,8 +742,6 @@ inner_syscall_handler(int32_t n, int32_t a, int32_t b, int32_t c, int32_t d, int
return -1; return -1;
/* TODO: The calls below need to be validated / refactored to be non-blocking */ /* TODO: The calls below need to be validated / refactored to be non-blocking */
// case SYS_READV:
// return wasm_readv(a, b, c);
// case SYS_OPEN: // case SYS_OPEN:
// return wasm_open(a, b, c); // return wasm_open(a, b, c);
// case SYS_STAT: // case SYS_STAT:

Loading…
Cancel
Save