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

@@ -380,7 +380,7 @@ syscalls! {
return return_encoded_errno(e);
}
let e = host::wasmtime_ssp_fd_prestat_get(prestats, fd, &mut host_buf);
let e = host_impls::wasmtime_ssp_fd_prestat_get(&mut *prestats, fd, &mut host_buf);
encode_prestat_byref(vmctx, buf, host_buf);