Add Rust impl of wasmtime_ssp_fd_prestat_get

In more detail, this commit:
* makes fd_prestat_get safe
* rewrites fd_prestats_get_entry in (safe) Rust
* creates helper macros for rwlock read lock and unlock
This commit is contained in:
Jakub Konka
2019-04-30 21:20:50 +02:00
committed by Dan Gohman
parent b0eab7398d
commit 5c555406ca
7 changed files with 67 additions and 44 deletions

View File

@@ -497,14 +497,6 @@ __wasi_errno_t wasmtime_ssp_environ_sizes_get(
size_t *environ_buf_size
) WASMTIME_SSP_SYSCALL_NAME(environ_sizes_get) __attribute__((__warn_unused_result__));
__wasi_errno_t wasmtime_ssp_fd_prestat_get(
#if !defined(WASMTIME_SSP_STATIC_CURFDS)
struct fd_prestats *prestats,
#endif
__wasi_fd_t fd,
__wasi_prestat_t *buf
) WASMTIME_SSP_SYSCALL_NAME(fd_prestat_get) __attribute__((__warn_unused_result__));
__wasi_errno_t wasmtime_ssp_fd_prestat_dir_name(
#if !defined(WASMTIME_SSP_STATIC_CURFDS)
struct fd_prestats *prestats,