Home
last modified time | relevance | path

Searched refs:Mutex (Results 1 – 25 of 57) sorted by relevance

123

/wasmtime-44.0.1/examples/min-platform/embedding/src/
H A Dallocator.rs27 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 Dsync_nostd.rs30 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 Dmemory_creator.rs8 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 Dmod.rs11 sync::Mutex,
26 pub static DOWNLOAD_LOCK: Mutex<()> = Mutex::new(());
/wasmtime-44.0.1/crates/wasi/src/p2/
H A Dtcp.rs13 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 Dvtune.rs18 use std::sync::Mutex;
24 state: Mutex<State>,
36 state: Mutex::new(State { in new()
H A Dperfmap.rs6 use std::{fs::File, sync::Mutex};
9 static PERFMAP_FILE: Mutex<Option<File>> = Mutex::new(None);
H A Djitdump.rs18 use std::sync::Mutex;
28 static JITDUMP_FILE: Mutex<Option<JitDumpFile>> = Mutex::new(None);
H A Dpulley.rs43 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 Dasync_post_return_callee.rs5 sync::Mutex,
8 static POST_RETURN_VALUE: Mutex<Option<String>> = Mutex::new(None);
H A Dp2_api_reactor.rs1 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 Dshared.rs2 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 Dlib.rs6 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 Dlocked_async.rs9 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 Dgc_heap_pool.rs6 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 Dutil.rs11 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 Ddifferential.rs7 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 Dgdb_jit_int.rs39 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 Dwindows.rs14 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 Dfunc.rs5 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 Dabort.rs3 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 Dconcurrent.rs13 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 Dctx.rs11 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 Dpytorch.rs10 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 Dopenvino.rs11 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>>);

123