Add Rust impl of wasmtime_ssp_sched_yield

Also, add Rust implementation of errno and convert_errno.
This commit is contained in:
Jakub Konka
2019-04-28 16:48:43 +02:00
committed by Dan Gohman
parent 26cbbaab41
commit a51ffb6b6d
5 changed files with 143 additions and 10 deletions

View File

@@ -850,9 +850,6 @@ __wasi_errno_t wasmtime_ssp_sock_shutdown(
__wasi_sdflags_t how
) WASMTIME_SSP_SYSCALL_NAME(sock_shutdown) __attribute__((__warn_unused_result__));
__wasi_errno_t wasmtime_ssp_sched_yield(void)
WASMTIME_SSP_SYSCALL_NAME(sched_yield) __attribute__((__warn_unused_result__));
#ifdef __cplusplus
}
#endif

View File

@@ -2684,12 +2684,6 @@ __wasi_errno_t wasmtime_ssp_sock_shutdown(
return 0;
}
__wasi_errno_t wasmtime_ssp_sched_yield(void) {
if (sched_yield() < 0)
return convert_errno(errno);
return 0;
}
__wasi_errno_t wasmtime_ssp_args_get(
#if !defined(WASMTIME_SSP_STATIC_CURFDS)
struct argv_environ_values *argv_environ,