Function wasmer_wasix::syscalls::wasix::thread_spawn::thread_spawn_v2

source ·
pub fn thread_spawn_v2<M: MemorySize>(
    ctx: FunctionEnvMut<'_, WasiEnv>,
    start_ptr: WasmPtr<ThreadStart<M>, M>,
    ret_tid: WasmPtr<Tid, M>,
) -> Errno
Expand description

§thread_spawn()

Creates a new thread by spawning that shares the same memory address space, file handles and main event loops.

§Parameters

  • start_ptr - Pointer to the structure that describes the thread to be launched
  • ret_tid - ID of the thread that was launched

§Return

Returns the thread index of the newly created thread (indices always start from the same value as pid and increments in steps)