| /wasmtime-44.0.1/examples/min-platform/embedding/src/ |
| H A D | allocator.rs | 27 dlmalloc: Mutex::new(Dlmalloc::new_with_allocator(MyAllocator)), 31 dlmalloc: Mutex<Dlmalloc<MyAllocator>>, 122 struct Mutex<T> { struct 127 unsafe impl<T: Send> Send for Mutex<T> {} argument 128 unsafe impl<T: Send> Sync for Mutex<T> {} implementation 130 impl<T> Mutex<T> { implementation 131 const fn new(val: T) -> Mutex<T> { in new() 132 Mutex { in new() 148 lock: &'a Mutex<T>,
|
| /wasmtime-44.0.1/crates/wasmtime/src/ |
| H A D | sync_nostd.rs | 30 mutex: raw::Mutex, 45 mutex: raw::Mutex::new(), in new() 118 lock: &'a raw::Mutex, 231 pub struct Mutex { struct 235 impl Mutex { impl 236 pub const fn new() -> Mutex { in new() 237 Mutex { in new() 322 pub struct Mutex { struct 326 impl Mutex { impl 328 Mutex { in new() [all …]
|
| /wasmtime-44.0.1/tests/all/ |
| H A D | memory_creator.rs | 8 use std::sync::{Arc, Mutex}; 15 glob_bytes_counter: Arc<Mutex<usize>>, 19 unsafe fn new(minimum: usize, maximum: usize, glob_counter: Arc<Mutex<usize>>) -> Self { in new() 86 pub num_created_memories: Mutex<usize>, 87 pub num_total_bytes: Arc<Mutex<usize>>, 93 num_created_memories: Mutex::new(0), in new() 94 num_total_bytes: Arc::new(Mutex::new(0)), in new()
|
| /wasmtime-44.0.1/crates/wasi-nn/tests/check/ |
| H A D | mod.rs | 11 sync::Mutex, 26 pub static DOWNLOAD_LOCK: Mutex<()> = Mutex::new(());
|
| /wasmtime-44.0.1/crates/wasi/src/p2/ |
| H A D | tcp.rs | 13 use tokio::sync::Mutex; 18 let reader = Arc::new(Mutex::new(TcpReader::new(self.take_receive_stream()?))); in p2_streams() 19 let writer = Arc::new(Mutex::new(TcpWriter::new(self.take_send_stream()?))); in p2_streams() 31 reader: Arc<Mutex<TcpReader>>, 32 writer: Arc<Mutex<TcpWriter>>, 106 struct TcpReadStream(Arc<Mutex<TcpReader>>); 312 struct TcpWriteStream(Arc<Mutex<TcpWriter>>); 346 fn try_lock_for_stream<T>(mutex: &Mutex<T>) -> Result<tokio::sync::MutexGuard<'_, T>, StreamError> { in try_lock_for_stream() 352 fn try_lock_for_socket<T>(mutex: &Mutex<T>) -> SocketResult<tokio::sync::MutexGuard<'_, T>> { in try_lock_for_socket()
|
| /wasmtime-44.0.1/crates/wasmtime/src/profiling_agent/ |
| H A D | vtune.rs | 18 use std::sync::Mutex; 24 state: Mutex<State>, 36 state: Mutex::new(State { in new()
|
| H A D | perfmap.rs | 6 use std::{fs::File, sync::Mutex}; 9 static PERFMAP_FILE: Mutex<Option<File>> = Mutex::new(None);
|
| H A D | jitdump.rs | 18 use std::sync::Mutex; 28 static JITDUMP_FILE: Mutex<Option<JitDumpFile>> = Mutex::new(None);
|
| H A D | pulley.rs | 43 use std::sync::{Arc, Condvar, Mutex}; 64 recorder: Mutex<Recorder>, 69 sampling: Mutex<SamplingState>, 102 recorder: Mutex::new(Recorder::new(&filename).to_wasmtime_result()?), in new()
|
| /wasmtime-44.0.1/crates/test-programs/src/bin/ |
| H A D | async_post_return_callee.rs | 5 sync::Mutex, 8 static POST_RETURN_VALUE: Mutex<Option<String>> = Mutex::new(None);
|
| H A D | p2_api_reactor.rs | 1 use std::sync::{Mutex, MutexGuard}; 14 static STATE: Mutex<Vec<String>> = Mutex::new(Vec::new()); in state()
|
| /wasmtime-44.0.1/crates/wasi-tls/src/p3/util/ |
| H A D | shared.rs | 2 use std::sync::{Arc, Mutex, MutexGuard}; 9 pub(crate) struct Shared<IO>(Arc<Mutex<IO>>); 12 Self(Arc::new(Mutex::new(io))) in new()
|
| /wasmtime-44.0.1/crates/test-programs/artifacts/src/ |
| H A D | lib.rs | 6 use std::sync::{Arc, Mutex}; 50 static CACHE: Mutex<Option<HashMap<Vec<u8>, Vec<u8>>>> = Mutex::new(None); in cache_store()
|
| /wasmtime-44.0.1/crates/wasi/src/cli/ |
| H A D | locked_async.rs | 9 use tokio::sync::{Mutex, OwnedMutexGuard}; 56 pub struct AsyncStdinStream(Arc<Mutex<p2::pipe::AsyncReadStream>>); 60 Self(Arc::new(Mutex::new(p2::pipe::AsyncReadStream::new(s)))) in new() 137 pub struct AsyncStdoutStream(Arc<Mutex<p2::pipe::AsyncWriteStream>>); 141 Self(Arc::new(Mutex::new(p2::pipe::AsyncWriteStream::new( in new() 251 Ready(Arc<Mutex<S>>),
|
| /wasmtime-44.0.1/crates/wasmtime/src/runtime/vm/instance/allocator/pooling/ |
| H A D | gc_heap_pool.rs | 6 use std::sync::Mutex; 45 heaps: Mutex<Box<[HeapSlot]>>, 66 let heaps = Mutex::new((0..max_gc_heaps).map(|_| HeapSlot::Free(None)).collect()); in new()
|
| /wasmtime-44.0.1/crates/misc/component-async-tests/tests/scenario/ |
| H A D | util.rs | 11 use tokio::sync::Mutex; 143 static CACHE: LazyLock<Mutex<HashMap<Vec<String>, Arc<Mutex<Option<Arc<Vec<u8>>>>>>>> = in make_component() 144 LazyLock::new(|| Mutex::new(HashMap::new())); in make_component() 151 .or_insert_with(|| Arc::new(Mutex::new(None))) in make_component()
|
| /wasmtime-44.0.1/fuzz/fuzz_targets/ |
| H A D | differential.rs | 7 use std::sync::{Mutex, Once}; 25 static ALLOWED_ENGINES: Mutex<Vec<Option<&str>>> = Mutex::new(vec![]); 26 static ALLOWED_MODULES: Mutex<Vec<Option<&str>>> = Mutex::new(vec![]);
|
| /wasmtime-44.0.1/crates/jit-debug/src/ |
| H A D | gdb_jit_int.rs | 39 use std::sync::{Mutex, MutexGuard}; 47 pub static GDB_REGISTRATION: Mutex<()> = Mutex::new(());
|
| /wasmtime-44.0.1/crates/wasi-common/src/sync/sched/ |
| H A D | windows.rs | 14 use std::sync::{LazyLock, Mutex}; 146 static STDIN_POLL: LazyLock<Mutex<StdinPoll>> = LazyLock::new(StdinPoll::new); 149 pub fn new() -> Mutex<Self> { in new() 153 Mutex::new(StdinPoll { in new()
|
| /wasmtime-44.0.1/crates/c-api/src/types/ |
| H A D | func.rs | 5 sync::{Arc, Mutex}, 85 ty: Arc<Mutex<LazyFuncType>>, 129 ty: Arc::new(Mutex::new(LazyFuncType::FuncType(ty))), in new() 137 ty: Arc::new(Mutex::new(LazyFuncType::Lazy { params, results })), in lazy()
|
| /wasmtime-44.0.1/crates/wasmtime/src/runtime/component/concurrent/ |
| H A D | abort.rs | 3 use std::sync::{Arc, Mutex}; 16 state: Arc<Mutex<JoinState>>, 88 state: Arc::new(Mutex::new(JoinState::Running { in run() 128 state: Arc<Mutex<JoinState>>,
|
| /wasmtime-44.0.1/cranelift/filetests/src/ |
| H A D | concurrent.rs | 13 use std::sync::{Arc, Mutex}; 50 let request_mutex = Arc::new(Mutex::new(request_rx)); in new() 131 requests: Arc<Mutex<Receiver<Request>>>, in worker_thread()
|
| /wasmtime-44.0.1/crates/wasi-common/src/ |
| H A D | ctx.rs | 11 use std::sync::{Arc, Mutex}; 27 pub random: Mutex<Box<dyn RngCore + Send + Sync>>, 43 random: Mutex::new(random), in new()
|
| /wasmtime-44.0.1/crates/wasi-nn/src/backend/ |
| H A D | pytorch.rs | 10 use std::sync::{Arc, Mutex}; 40 module: Arc::new(Mutex::new(compiled_module)), in load() 64 module: Arc::new(Mutex::new(compiled_module)), in load_from_dir() 73 module: Arc<Mutex<tch::CModule>>, 96 module: Arc<Mutex<tch::CModule>>,
|
| H A D | openvino.rs | 11 use std::sync::{Arc, Mutex}; 53 Box::new(OpenvinoGraph(Arc::new(Mutex::new(compiled_model)))); in load() 74 struct OpenvinoGraph(Arc<Mutex<openvino::CompiledModel>>); 89 struct OpenvinoExecutionContext(openvino::InferRequest, Arc<Mutex<openvino::CompiledModel>>);
|