mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-13 06:15:33 +00:00
keeep top level wasi calls that call out to platform-specific impls
This commit is contained in:
parent
bd09343fca
commit
ea27effdb3
@ -72,6 +72,23 @@ pub fn args_sizes_get(ctx: &mut Ctx, argc_out: u32, argv_buf_size_out: u32) {
|
|||||||
memory.view::<u32>()[(argv_buf_size_out / 4) as usize].set(total_arg_size as u32);
|
memory.view::<u32>()[(argv_buf_size_out / 4) as usize].set(total_arg_size as u32);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn clock_res_get(
|
||||||
|
ctx: &mut Ctx,
|
||||||
|
clock_id: __wasi_clockid_t,
|
||||||
|
resolution: WasmPtr<__wasi_timestamp_t>,
|
||||||
|
) -> __wasi_errno_t {
|
||||||
|
platform_clock_res_get(ctx, clock_id, resolution)
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn clock_time_get(
|
||||||
|
ctx: &mut Ctx,
|
||||||
|
clock_id: __wasi_clockid_t,
|
||||||
|
precision: __wasi_timestamp_t,
|
||||||
|
time: WasmPtr<__wasi_timestamp_t>,
|
||||||
|
) -> __wasi_errno_t {
|
||||||
|
platform_clock_time_get(ctx, clock_id, precision, time)
|
||||||
|
}
|
||||||
|
|
||||||
/// ### `environ_get()`
|
/// ### `environ_get()`
|
||||||
/// Read environment variable data.
|
/// Read environment variable data.
|
||||||
/// The sizes of the buffers should match that returned by [`environ_sizes_get()`](#environ_sizes_get).
|
/// The sizes of the buffers should match that returned by [`environ_sizes_get()`](#environ_sizes_get).
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
use crate::syscalls::types::*;
|
use crate::syscalls::types::*;
|
||||||
use wasmer_runtime_core::{memory::Memory, vm::Ctx};
|
use wasmer_runtime_core::{memory::Memory, vm::Ctx};
|
||||||
|
|
||||||
pub fn clock_res_get(
|
pub fn platform_clock_res_get(
|
||||||
ctx: &mut Ctx,
|
ctx: &mut Ctx,
|
||||||
clock_id: __wasi_clockid_t,
|
clock_id: __wasi_clockid_t,
|
||||||
resolution: WasmPtr<__wasi_timestamp_t>,
|
resolution: WasmPtr<__wasi_timestamp_t>,
|
||||||
@ -9,7 +9,7 @@ pub fn clock_res_get(
|
|||||||
__WASI_EINVAL
|
__WASI_EINVAL
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn clock_time_get(
|
pub fn platform_clock_time_get(
|
||||||
ctx: &mut Ctx,
|
ctx: &mut Ctx,
|
||||||
clock_id: __wasi_clockid_t,
|
clock_id: __wasi_clockid_t,
|
||||||
precision: __wasi_timestamp_t,
|
precision: __wasi_timestamp_t,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
use crate::syscalls::types::*;
|
use crate::syscalls::types::*;
|
||||||
use wasmer_runtime_core::{memory::Memory, vm::Ctx};
|
use wasmer_runtime_core::{memory::Memory, vm::Ctx};
|
||||||
|
|
||||||
pub fn clock_res_get(
|
pub fn platform_clock_res_get(
|
||||||
ctx: &mut Ctx,
|
ctx: &mut Ctx,
|
||||||
clock_id: __wasi_clockid_t,
|
clock_id: __wasi_clockid_t,
|
||||||
resolution: WasmPtr<__wasi_timestamp_t>,
|
resolution: WasmPtr<__wasi_timestamp_t>,
|
||||||
@ -9,7 +9,7 @@ pub fn clock_res_get(
|
|||||||
__WASI_EINVAL
|
__WASI_EINVAL
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn clock_time_get(
|
pub fn platform_clock_time_get(
|
||||||
ctx: &mut Ctx,
|
ctx: &mut Ctx,
|
||||||
clock_id: __wasi_clockid_t,
|
clock_id: __wasi_clockid_t,
|
||||||
precision: __wasi_timestamp_t,
|
precision: __wasi_timestamp_t,
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
use crate::syscalls::types::*;
|
use crate::syscalls::types::*;
|
||||||
use wasmer_runtime_core::{memory::Memory, vm::Ctx};
|
use wasmer_runtime_core::{memory::Memory, vm::Ctx};
|
||||||
|
|
||||||
pub fn clock_res_get(
|
pub fn platform_clock_res_get(
|
||||||
ctx: &mut Ctx,
|
ctx: &mut Ctx,
|
||||||
clock_id: __wasi_clockid_t,
|
clock_id: __wasi_clockid_t,
|
||||||
resolution: WasmPtr<__wasi_timestamp_t>,
|
resolution: WasmPtr<__wasi_timestamp_t>,
|
||||||
@ -9,7 +9,7 @@ pub fn clock_res_get(
|
|||||||
__WASI_EINVAL
|
__WASI_EINVAL
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn clock_time_get(
|
pub fn platform_clock_time_get(
|
||||||
ctx: &mut Ctx,
|
ctx: &mut Ctx,
|
||||||
clock_id: __wasi_clockid_t,
|
clock_id: __wasi_clockid_t,
|
||||||
precision: __wasi_timestamp_t,
|
precision: __wasi_timestamp_t,
|
||||||
|
Loading…
Reference in New Issue
Block a user