Function wasmer_wasix::syscalls::wasix::futex_wait::futex_wait

source ·
pub fn futex_wait<M: MemorySize + 'static>(
    ctx: FunctionEnvMut<'_, WasiEnv>,
    futex_ptr: WasmPtr<u32, M>,
    expected: u32,
    timeout: WasmPtr<OptionTimestamp, M>,
    ret_woken: WasmPtr<Bool, M>,
) -> Result<Errno, WasiError>
Expand description

Wait for a futex_wake operation to wake us. Returns with EINVAL if the futex doesn’t hold the expected value. Returns false on timeout, and true in all other cases.

§Parameters

  • futex - Memory location that holds the value that will be checked
  • expected - Expected value that should be currently held at the memory location
  • timeout - Timeout should the futex not be triggered in the allocated time