MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / sync_start

Method sync_start

crates/wasmtime/src/runtime/component/concurrent.rs:4129–4155  ·  view source on GitHub ↗
(
        &mut self,
        instance: Instance,
        callback: *mut VMFuncRef,
        callee: NonNull<VMFuncRef>,
        param_count: u32,
        storage: *mut MaybeUninit<ValRaw>,
        stor

Source from the content-addressed store, hash-verified

4127 }
4128
4129 unsafe fn sync_start(
4130 &mut self,
4131 instance: Instance,
4132 callback: *mut VMFuncRef,
4133 callee: NonNull<VMFuncRef>,
4134 param_count: u32,
4135 storage: *mut MaybeUninit<ValRaw>,
4136 storage_len: usize,
4137 ) -> Result<()> {
4138 unsafe {
4139 instance
4140 .start_call(
4141 StoreContextMut(self),
4142 callback,
4143 ptr::null_mut(),
4144 callee,
4145 param_count,
4146 1,
4147 START_FLAG_ASYNC_CALLEE,
4148 // SAFETY: The `wasmtime_cranelift`-generated code that calls
4149 // this method will have ensured that `storage` is a valid
4150 // pointer containing at least `storage_len` items.
4151 Some(core::slice::from_raw_parts_mut(storage, storage_len)),
4152 )
4153 .map(drop)
4154 }
4155 }
4156
4157 unsafe fn async_start(
4158 &mut self,

Callers 1

sync_startFunction · 0.80

Calls 3

StoreContextMutClass · 0.85
start_callMethod · 0.80
mapMethod · 0.45

Tested by

no test coverage detected