Home
last modified time | relevance | path

Searched refs:MutexGuard (Results 1 – 25 of 70) sorted by relevance

123

/external/rust/crates/tokio/src/loom/std/
Dparking_lot.rs31 pub(crate) struct MutexGuard<'a, T: ?Sized>( struct
32 PhantomData<std::sync::MutexGuard<'a, T>>,
33 parking_lot::MutexGuard<'a, T>,
62 pub(crate) fn lock(&self) -> MutexGuard<'_, T> { in lock()
63 MutexGuard(PhantomData, self.1.lock()) in lock()
67 pub(crate) fn try_lock(&self) -> Option<MutexGuard<'_, T>> { in try_lock()
70 .map(|guard| MutexGuard(PhantomData, guard)) in try_lock()
82 impl<'a, T: ?Sized> Deref for MutexGuard<'a, T> { implementation
89 impl<'a, T: ?Sized> DerefMut for MutexGuard<'a, T> { implementation
148 mut guard: MutexGuard<'a, T>, in wait()
[all …]
Dmutex.rs1 use std::sync::{self, MutexGuard, TryLockError};
22 pub(crate) fn lock(&self) -> MutexGuard<'_, T> { in lock()
30 pub(crate) fn try_lock(&self) -> Option<MutexGuard<'_, T>> { in try_lock()
/external/crosvm/common/sync/src/
Dcondvar.rs8 use std::sync::MutexGuard;
29 pub fn wait<'a, T>(&self, guard: MutexGuard<'a, T>) -> MutexGuard<'a, T> { in wait()
35 pub fn wait_while<'a, T, F>(&self, guard: MutexGuard<'a, T>, condition: F) -> MutexGuard<'a, T> in wait_while()
48 guard: MutexGuard<'a, T>, in wait_timeout()
50 ) -> (MutexGuard<'a, T>, WaitTimeoutResult) { in wait_timeout()
57 guard: MutexGuard<'a, T>, in wait_timeout_while()
60 ) -> (MutexGuard<'a, T>, WaitTimeoutResult) in wait_timeout_while()
Dmutex.rs31 use std::sync::MutexGuard;
64 pub fn lock(&self) -> MutexGuard<T> { in lock()
78 pub fn try_lock(&self) -> Result<MutexGuard<T>, WouldBlock> { in try_lock()
/external/swiftshader/third_party/llvm-subzero/include/llvm/Support/
DMutexGuard.h27 class MutexGuard {
29 MutexGuard(const MutexGuard &) = delete;
30 void operator=(const MutexGuard &) = delete;
32 MutexGuard(sys::Mutex &m) : M(m) { M.lock(); } in MutexGuard() function
33 ~MutexGuard() { M.unlock(); } in ~MutexGuard()
/external/llvm/include/llvm/Support/
DMutexGuard.h27 class MutexGuard {
29 MutexGuard(const MutexGuard &) = delete;
30 void operator=(const MutexGuard &) = delete;
32 MutexGuard(sys::Mutex &m) : M(m) { M.lock(); } in MutexGuard() function
33 ~MutexGuard() { M.unlock(); } in ~MutexGuard()
/external/rust/crates/tracing-core/src/spin/
Dmutex.rs20 pub(crate) struct MutexGuard<'a, T: ?Sized> { struct
57 pub(crate) fn lock(&self) -> MutexGuard<'_, T> { in lock()
59 MutexGuard { in lock()
67 pub(crate) fn try_lock(&self) -> Option<MutexGuard<'_, T>> { in try_lock()
73 Some(MutexGuard { in try_lock()
100 impl<'a, T: ?Sized> Deref for MutexGuard<'a, T> { implementation
107 impl<'a, T: ?Sized> DerefMut for MutexGuard<'a, T> { implementation
113 impl<'a, T: ?Sized> Drop for MutexGuard<'a, T> { implementation
/external/rust/crates/spin/src/
Dmutex.rs127 pub struct MutexGuard<'a, T: 'a + ?Sized> { struct
184 pub fn lock(&self) -> MutexGuard<T> { in lock()
185 MutexGuard { in lock()
230 pub fn try_lock(&self) -> Option<MutexGuard<T>> { in try_lock()
233 .map(|guard| MutexGuard { inner: guard }) in try_lock()
273 impl<'a, T: ?Sized> MutexGuard<'a, T> { implementation
292 impl<'a, T: ?Sized + fmt::Debug> fmt::Debug for MutexGuard<'a, T> { implementation
298 impl<'a, T: ?Sized + fmt::Display> fmt::Display for MutexGuard<'a, T> { implementation
304 impl<'a, T: ?Sized> Deref for MutexGuard<'a, T> { implementation
311 impl<'a, T: ?Sized> DerefMut for MutexGuard<'a, T> { implementation
Dlib.rs93 pub use mutex::MutexGuard;
175 pub type MutexGuard<'a, T> = lock_api_crate::MutexGuard<'a, crate::Mutex<()>, T>; typedef
/external/rust/beto-rust/nearby/presence/ldt_np_adv_ffi/src/
Dhandle_map.rs26 use std::sync::{Mutex, MutexGuard};
46 … pub (crate) fn get_enc_handle_map() -> MutexGuard<'static, HandleMap<Box<LdtAdvEncrypter>>> {
55 … pub (crate) fn get_dec_handle_map() -> MutexGuard<'static, HandleMap<Box<LdtAdvDecrypter>>> {
63 use spin::{Mutex, MutexGuard};
82 … pub (crate) fn get_enc_handle_map() -> MutexGuard<'static, HandleMap<Box<LdtAdvEncrypter>>> {
87 … pub (crate) fn get_dec_handle_map() -> MutexGuard<'static, HandleMap<Box<LdtAdvDecrypter>>> {
/external/llvm/lib/ExecutionEngine/MCJIT/
DMCJIT.cpp96 MutexGuard locked(lock); in ~MCJIT()
108 MutexGuard locked(lock); in addModule()
117 MutexGuard locked(lock); in removeModule()
144 MutexGuard locked(lock); in setObjectCache()
149 MutexGuard locked(lock); in emitObject()
187 MutexGuard locked(lock); in generateCodeForModule()
236 MutexGuard locked(lock); in finalizeLoadedModules()
252 MutexGuard locked(lock); in finalizeObject()
267 MutexGuard locked(lock); in finalizeModule()
293 MutexGuard locked(lock); in findModuleForSymbol()
[all …]
/external/rust/crates/tokio/src/sync/
Dmutex.rs145 pub struct MutexGuard<'a, T: ?Sized> { struct
190 unsafe impl<T> Sync for MutexGuard<'_, T> where T: ?Sized + Send + Sync {} implementation
231 check_send::<MutexGuard<'_, u32>>(); in bounds()
339 pub async fn lock(&self) -> MutexGuard<'_, T> { in lock()
361 MutexGuard { in lock()
417 pub fn blocking_lock(&self) -> MutexGuard<'_, T> { in blocking_lock()
566 pub fn try_lock(&self) -> Result<MutexGuard<'_, T>, TryLockError> { in try_lock()
577 Ok(MutexGuard { in try_lock()
712 impl<'a, T: ?Sized> MutexGuard<'a, T> { implementation
835 impl<T: ?Sized> Drop for MutexGuard<'_, T> { implementation
[all …]
/external/rust/crates/lock_api/src/
Dmutex.rs196 unsafe fn guard(&self) -> MutexGuard<'_, R, T> { in guard()
197 MutexGuard { in guard()
213 pub fn lock(&self) -> MutexGuard<'_, R, T> { in lock()
227 pub fn try_lock(&self) -> Option<MutexGuard<'_, R, T>> { in try_lock()
362 pub fn try_lock_for(&self, timeout: R::Duration) -> Option<MutexGuard<'_, R, T>> { in try_lock_for()
377 pub fn try_lock_until(&self, timeout: R::Instant) -> Option<MutexGuard<'_, R, T>> { in try_lock_until()
489 pub struct MutexGuard<'a, R: RawMutex, T: ?Sized> { struct
494 unsafe impl<'a, R: RawMutex + Sync + 'a, T: ?Sized + Sync + 'a> Sync for MutexGuard<'a, R, T> {} implementation
496 impl<'a, R: RawMutex + 'a, T: ?Sized + 'a> MutexGuard<'a, R, T> { impl
581 impl<'a, R: RawMutexFair + 'a, T: ?Sized + 'a> MutexGuard<'a, R, T> { impl
[all …]
/external/rust/crates/futures-util/src/lock/
Dmutex.rs103 pub fn try_lock(&self) -> Option<MutexGuard<'_, T>> { in try_lock()
106 Some(MutexGuard { mutex: self }) in try_lock()
338 type Output = MutexGuard<'a, T>;
388 pub struct MutexGuard<'a, T: ?Sized> { struct
392 impl<'a, T: ?Sized> MutexGuard<'a, T> { argument
422 impl<T: ?Sized + fmt::Debug> fmt::Debug for MutexGuard<'_, T> { implementation
428 impl<T: ?Sized> Drop for MutexGuard<'_, T> { implementation
434 impl<T: ?Sized> Deref for MutexGuard<'_, T> { implementation
441 impl<T: ?Sized> DerefMut for MutexGuard<'_, T> { implementation
535 unsafe impl<T: ?Sized + Send> Send for MutexGuard<'_, T> {} implementation
[all …]
/external/rust/crates/tokio/src/loom/
Dmocked.rs5 pub(crate) use loom::sync::MutexGuard;
18 pub(crate) fn lock(&self) -> MutexGuard<'_, T> { in lock()
23 pub(crate) fn try_lock(&self) -> Option<MutexGuard<'_, T>> { in try_lock()
/external/rust/crates/parking_lot/src/
Dcondvar.rs8 use crate::mutex::MutexGuard;
255 pub fn wait<T: ?Sized>(&self, mutex_guard: &mut MutexGuard<'_, T>) { in wait()
256 self.wait_until_internal(unsafe { MutexGuard::mutex(mutex_guard).raw() }, None); in wait()
285 mutex_guard: &mut MutexGuard<'_, T>, in wait_until()
289 unsafe { MutexGuard::mutex(mutex_guard).raw() }, in wait_until()
381 mutex_guard: &mut MutexGuard<'_, T>, in wait_for()
385 self.wait_until_internal(unsafe { MutexGuard::mutex(mutex_guard).raw() }, deadline) in wait_for()
391 mutex_guard: &mut MutexGuard<'_, T>, in wait_while_until_internal()
403 self.wait_until_internal(unsafe { MutexGuard::mutex(mutex_guard).raw() }, timeout); in wait_while_until_internal()
425 pub fn wait_while<T, F>(&self, mutex_guard: &mut MutexGuard<'_, T>, condition: F) in wait_while()
[all …]
/external/rust/crates/async-trait/tests/ui/
Dsend-not-implemented.stderr12 …/send-not-implemented.rs:8:26: 12:6]`, the trait `Send` is not implemented for `MutexGuard<'_, ()>`
17 | ------ has type `MutexGuard<'_, ()>` which is not `Send`
36 …send-not-implemented.rs:14:38: 19:6]`, the trait `Send` is not implemented for `MutexGuard<'_, ()>`
41 | ------ has type `MutexGuard<'_, ()>` which is not `Send`
/external/rust/crates/parking_lot/
DCHANGELOG.md13 - Added `MutexGuard::leak` function. (#333)
190 - All methods on `MutexGuard` (and other guard types) are no longer inherent
191 methods and must be called as `MutexGuard::method(self)`. This avoids
193 - `MutexGuard` (and other guard types) add the `unlocked` method which
196 - `MutexGuard` (and other guard types) add the `bump` method which gives a
200 - `MutexGuard` (and other guard types) add the `map` method which returns a
202 `MappedMutexGuard` type is identical to `MutexGuard` except that it does not
/external/llvm/lib/Support/
DManagedStatic.cpp42 MutexGuard Lock(*getManagedStaticMutex()); in RegisterManagedStatic()
84 MutexGuard Lock(*getManagedStaticMutex()); in llvm_shutdown()
DErrorHandling.cpp50 llvm::MutexGuard Lock(*ErrorHandlerMutex); in install_fatal_error_handler()
57 llvm::MutexGuard Lock(*ErrorHandlerMutex); in remove_fatal_error_handler()
80 llvm::MutexGuard Lock(*ErrorHandlerMutex); in report_fatal_error()
/external/rust/crates/tokio-util/src/sync/cancellation_token/
Dtree_node.rs41 use crate::loom::sync::{Arc, Mutex, MutexGuard};
152 F: FnOnce(MutexGuard<'_, Inner>, Option<MutexGuard<'_, Inner>>) -> Ret, in with_locked_node_and_parent()
222 fn remove_child(parent: &mut Inner, mut node: MutexGuard<'_, Inner>) { in remove_child()
/external/rust/crates/tracing-core/src/
Dstdlib.rs52 pub(crate) use crate::spin::MutexGuard;
73 pub(crate) fn lock(&self) -> Result<MutexGuard<'_, T>, ()> { in lock()
/external/llvm/lib/ExecutionEngine/
DGDBRegistrationListener.cpp148 llvm::MutexGuard locked(*JITDebugLock); in ~GDBJITRegistrationListener()
175 llvm::MutexGuard locked(*JITDebugLock); in NotifyObjectEmitted()
195 llvm::MutexGuard locked(*JITDebugLock); in NotifyFreeingObject()
/external/swiftshader/third_party/llvm-subzero/lib/Support/
DErrorHandling.cpp50 llvm::MutexGuard Lock(*ErrorHandlerMutex); in install_fatal_error_handler()
57 llvm::MutexGuard Lock(*ErrorHandlerMutex); in remove_fatal_error_handler()
80 llvm::MutexGuard Lock(*ErrorHandlerMutex); in report_fatal_error()
/external/llvm/lib/Target/NVPTX/
DNVPTXUtilities.cpp39 MutexGuard Guard(Lock); in clearAnnotationCache()
44 MutexGuard Guard(Lock); in cacheAnnotationFromMD()
70 MutexGuard Guard(Lock); in cacheAnnotationFromMD()
104 MutexGuard Guard(Lock); in findOneNVVMAnnotation()
118 MutexGuard Guard(Lock); in findAllNVVMAnnotation()

123