| /external/curl/tests/data/ |
| D | test1554 | 22 -> Mutex lock 23 <- Mutex unlock 24 -> Mutex lock 25 <- Mutex unlock 26 -> Mutex lock 27 <- Mutex unlock 28 -> Mutex lock 29 <- Mutex unlock 30 -> Mutex lock 31 <- Mutex unlock [all …]
|
| /external/kotlinx.coroutines/kotlinx-coroutines-core/common/test/sync/ |
| D | MutexTest.kt | 14 val mutex = Mutex() in <lambda>() constant 18 mutex.lock() // suspends in <lambda>() 20 mutex.unlock() in <lambda>() 24 mutex.lock() // locked in <lambda>() 28 mutex.unlock() in <lambda>() 36 val mutex = Mutex() in tryLockTest() constant 37 assertFalse(mutex.isLocked) in tryLockTest() 38 assertTrue(mutex.tryLock()) in tryLockTest() 39 assertTrue(mutex.isLocked) in tryLockTest() 40 assertFalse(mutex.tryLock()) in tryLockTest() [all …]
|
| /external/guava/android/guava/src/com/google/common/collect/ |
| D | Synchronized.java | 47 * backing collection and the mutex are serializable. 49 * <p>If {@code null} is passed as the {@code mutex} parameter to any of this class's top-level 50 * methods or inner class constructors, the created object uses itself as the synchronization mutex. 73 final Object mutex; field in Synchronized.SynchronizedObject 75 SynchronizedObject(Object delegate, @CheckForNull Object mutex) { in SynchronizedObject() argument 77 this.mutex = (mutex == null) ? this : mutex; in SynchronizedObject() 88 synchronized (mutex) { in toString() 100 synchronized (mutex) { in writeObject() 110 Collection<E> collection, @CheckForNull Object mutex) { in collection() argument 111 return new SynchronizedCollection<E>(collection, mutex); in collection() [all …]
|
| /external/guava/guava/src/com/google/common/collect/ |
| D | Synchronized.java | 55 * backing collection and the mutex are serializable. 57 * <p>If {@code null} is passed as the {@code mutex} parameter to any of this class's top-level 58 * methods or inner class constructors, the created object uses itself as the synchronization mutex. 81 final Object mutex; field in Synchronized.SynchronizedObject 83 SynchronizedObject(Object delegate, @CheckForNull Object mutex) { in SynchronizedObject() argument 85 this.mutex = (mutex == null) ? this : mutex; in SynchronizedObject() 96 synchronized (mutex) { in toString() 108 synchronized (mutex) { in writeObject() 118 Collection<E> collection, @CheckForNull Object mutex) { in collection() argument 119 return new SynchronizedCollection<E>(collection, mutex); in collection() [all …]
|
| /external/rust/crates/futures-util/src/lock/ |
| D | mutex.rs | 6 use std::sync::{Arc, Mutex as StdMutex}; 14 /// A futures-aware mutex. 18 /// This mutex provides no fairness guarantees. Tasks may not acquire the mutex 22 pub struct Mutex<T: ?Sized> { struct 28 impl<T: ?Sized> fmt::Debug for Mutex<T> { argument 31 f.debug_struct("Mutex") in fmt() 38 impl<T> From<T> for Mutex<T> { implementation 44 impl<T: Default> Default for Mutex<T> { implementation 74 impl<T> Mutex<T> { implementation 75 /// Creates a new futures-aware mutex. [all …]
|
| /external/rust/crates/grpcio-sys/grpc/third_party/re2/util/ |
| D | mutex.h | 9 * A simple mutex wrapper, supporting locks and read-write locks. 36 #include <mutex> 37 typedef std::mutex MutexType; 42 class Mutex { 44 inline Mutex(); 45 inline ~Mutex(); 53 inline void ReaderUnlock(); // Release a read share of this Mutex 60 // Catch the error of writing Mutex when intending MutexLock. 61 Mutex(Mutex *ignored); 63 Mutex(const Mutex&) = delete; [all …]
|
| /external/gflags/src/ |
| D | mutex.h | 32 // A simple mutex wrapper, supporting locks and read-write locks. 40 // problems when we have multiple versions of Mutex in each shared object. 64 // function that tries to acquire this mutex -- but that all happens 65 // before this mutex's constructor has run. (This can happen even if 66 // the mutex and the function that uses the mutex are in the same .cc 67 // file.) Basically, because Mutex does non-trivial work in its 71 // The solution used here is to pair the actual mutex primitive with a 72 // bool that is set to true when the mutex is dynamically initialized. 73 // (Before that it's false.) Then we modify all mutex routines to 75 // it to true (which happens after the Mutex constructor has run.) [all …]
|
| /external/pigweed/pw_sync/ |
| D | mutex_facade_test.cc | 18 #include "pw_sync/mutex.h" 26 void pw_sync_Mutex_CallLock(pw_sync_Mutex* mutex); 27 bool pw_sync_Mutex_CallTryLock(pw_sync_Mutex* mutex); 28 void pw_sync_Mutex_CallUnlock(pw_sync_Mutex* mutex); 34 TEST(Mutex, LockUnlock) { in TEST() argument 35 pw::sync::Mutex mutex; in TEST() local 36 mutex.lock(); in TEST() 38 // EXPECT_FALSE(mutex.try_lock()); in TEST() 39 mutex.unlock(); in TEST() 42 Mutex static_mutex; [all …]
|
| /external/XNNPACK/src/ |
| D | mutex.c | 11 #include <xnnpack/mutex.h> 24 enum xnn_status xnn_mutex_init(struct xnn_mutex* mutex) { in xnn_mutex_init() argument 26 mutex->handle = CreateMutexW( in xnn_mutex_init() 30 if (mutex->handle == NULL) { in xnn_mutex_init() 31 xnn_log_error("failed to initialize mutex, error code: %" PRIu32, (uint32_t) GetLastError()); in xnn_mutex_init() 35 mutex->semaphore = dispatch_semaphore_create(1); in xnn_mutex_init() 36 if (mutex->semaphore == NULL) { in xnn_mutex_init() 37 xnn_log_error("failed to initialize mutex"); in xnn_mutex_init() 41 const int ret = pthread_mutex_init(&mutex->mutex, NULL); in xnn_mutex_init() 43 xnn_log_error("failed to initialize mutex, error code: %d", ret); in xnn_mutex_init() [all …]
|
| /external/clang/test/SemaCXX/ |
| D | warn-thread-safety-analysis.cpp | 30 class LOCKABLE Mutex { class 40 const Mutex& operator!() const { return *this; } in operator !() 48 MutexLock(Mutex *mu) EXCLUSIVE_LOCK_FUNCTION(mu); 49 MutexLock(Mutex *mu, bool adopt) EXCLUSIVE_LOCKS_REQUIRED(mu); 55 ReaderMutexLock(Mutex *mu) SHARED_LOCK_FUNCTION(mu); 56 ReaderMutexLock(Mutex *mu, bool adopt) SHARED_LOCKS_REQUIRED(mu); 62 ReleasableMutexLock(Mutex *mu) EXCLUSIVE_LOCK_FUNCTION(mu); 70 DoubleMutexLock(Mutex *mu1, Mutex *mu2) 141 Mutex sls_mu; 143 Mutex sls_mu2 __attribute__((acquired_after(sls_mu))); [all …]
|
| /external/openthread/third_party/mbedtls/repo/tests/src/ |
| D | threading_helpers.c | 1 /** Mutex usage verification framework. */ 27 /** Mutex usage verification framework. 29 * The mutex usage verification code below aims to detect bad usage of 30 * Mbed TLS's mutex abstraction layer at runtime. Note that this is solely 31 * about the use of the mutex itself, not about checking whether the mutex 34 * The normal usage of a mutex is: 50 * An attempt to use an uninitialized mutex cannot be detected in general 53 * All-bits-zero is the state of a freed mutex, which is distinct from an 54 * initialized mutex, so attempting to use zero-initialized memory as a mutex 59 * means that a mutex is not being freed somewhere, which is a memory leak [all …]
|
| /external/mbedtls/tests/src/ |
| D | threading_helpers.c | 1 /** Mutex usage verification framework. */ 27 /** Mutex usage verification framework. 29 * The mutex usage verification code below aims to detect bad usage of 30 * Mbed TLS's mutex abstraction layer at runtime. Note that this is solely 31 * about the use of the mutex itself, not about checking whether the mutex 34 * The normal usage of a mutex is: 50 * An attempt to use an uninitialized mutex cannot be detected in general 53 * All-bits-zero is the state of a freed mutex, which is distinct from an 54 * initialized mutex, so attempting to use zero-initialized memory as a mutex 59 * means that a mutex is not being freed somewhere, which is a memory leak [all …]
|
| /external/rust/crates/lock_api/src/ |
| D | mutex.rs | 27 /// Basic operations for a mutex. 29 /// Types implementing this trait can be used by `Mutex` to form a safe and 30 /// fully-functioning mutex type. 34 /// Implementations of this trait must ensure that the mutex is actually 35 /// exclusive: a lock can't be acquired while the mutex is already locked. 37 /// Initial value for an unlocked mutex. 47 /// Acquires this mutex, blocking the current thread until it is able to do so. 50 /// Attempts to acquire this mutex without blocking. Returns `true` 54 /// Unlocks this mutex. 58 /// This method may only be called if the mutex is held in the current context, i.e. it must [all …]
|
| /external/webrtc/third_party/abseil-cpp/absl/synchronization/ |
| D | mutex.h | 16 // mutex.h 19 // This header file defines a `Mutex` -- a mutually exclusive lock -- and the 21 // shared resources. A mutex is used to prevent multiple threads from accessing 24 // Unlike a `std::mutex`, the Abseil `Mutex` provides the following additional 26 // * Conditional predicates intrinsic to the `Mutex` object 32 // MutexLock - An RAII wrapper to acquire and release a `Mutex` for exclusive/ 36 // - An RAII wrapper to acquire and release a `Mutex` for shared/read 43 // In addition to simple mutex locks, this file also defines ways to perform 47 // depends on state protected by the `Mutex` to become true. 54 // Mutexes and mutex behavior can be quite complicated. The information within [all …]
|
| /external/abseil-cpp/absl/synchronization/ |
| D | mutex.h | 16 // mutex.h 19 // This header file defines a `Mutex` -- a mutually exclusive lock -- and the 21 // shared resources. A mutex is used to prevent multiple threads from accessing 24 // Unlike a `std::mutex`, the Abseil `Mutex` provides the following additional 26 // * Conditional predicates intrinsic to the `Mutex` object 32 // MutexLock - An RAII wrapper to acquire and release a `Mutex` for exclusive/ 36 // - An RAII wrapper to acquire and release a `Mutex` for shared/read 43 // In addition to simple mutex locks, this file also defines ways to perform 47 // depends on state protected by the `Mutex` to become true. 54 // Mutexes and mutex behavior can be quite complicated. The information within [all …]
|
| /external/tensorflow/third_party/absl/abseil-cpp/absl/synchronization/ |
| D | mutex.h | 16 // mutex.h 19 // This header file defines a `Mutex` -- a mutually exclusive lock -- and the 21 // shared resources. A mutex is used to prevent multiple threads from accessing 24 // Unlike a `std::mutex`, the Abseil `Mutex` provides the following additional 26 // * Conditional predicates intrinsic to the `Mutex` object 32 // MutexLock - An RAII wrapper to acquire and release a `Mutex` for exclusive/ 36 // - An RAII wrapper to acquire and release a `Mutex` for shared/read 43 // In addition to simple mutex locks, this file also defines ways to perform 47 // depends on state protected by the `Mutex` to become true. 54 // Mutexes and mutex behavior can be quite complicated. The information within [all …]
|
| /external/rust/crates/grpcio-sys/grpc/third_party/abseil-cpp/absl/synchronization/ |
| D | mutex.h | 16 // mutex.h 19 // This header file defines a `Mutex` -- a mutually exclusive lock -- and the 21 // shared resources. A mutex is used to prevent multiple threads from accessing 24 // Unlike a `std::mutex`, the Abseil `Mutex` provides the following additional 26 // * Conditional predicates intrinsic to the `Mutex` object 32 // MutexLock - An RAII wrapper to acquire and release a `Mutex` for exclusive/ 36 // - An RAII wrapper to acquire and release a `Mutex` for shared/read 43 // In addition to simple mutex locks, this file also defines ways to perform 47 // depends on state protected by the `Mutex` to become true. 54 // Mutexes and mutex behavior can be quite complicated. The information within [all …]
|
| /external/openscreen/third_party/abseil/src/absl/synchronization/ |
| D | mutex.h | 16 // mutex.h 19 // This header file defines a `Mutex` -- a mutually exclusive lock -- and the 21 // shared resources. A mutex is used to prevent multiple threads from accessing 24 // Unlike a `std::mutex`, the Abseil `Mutex` provides the following additional 26 // * Conditional predicates intrinsic to the `Mutex` object 32 // MutexLock - An RAII wrapper to acquire and release a `Mutex` for exclusive/ 36 // - An RAII wrapper to acquire and release a `Mutex` for shared/read 43 // In addition to simple mutex locks, this file also defines ways to perform 47 // depends on state protected by the `Mutex` to become true. 54 // Mutexes and mutex behavior can be quite complicated. The information within [all …]
|
| /external/rust/crates/tokio/src/sync/ |
| D | mutex.rs | 13 /// An asynchronous `Mutex`-like type. 15 /// This type acts similarly to [`std::sync::Mutex`], with two major 19 /// # Which kind of mutex should you use? 22 /// [`Mutex`][std] from the standard library in asynchronous code. 24 /// The feature that the async mutex offers over the blocking mutex is the 26 /// mutex more expensive than the blocking mutex, so the blocking mutex should 28 /// async mutex is to provide shared mutable access to IO resources such as a 29 /// database connection. If the value behind the mutex is just data, it's 30 /// usually appropriate to use a blocking mutex such as the one in the standard 33 /// Note that, although the compiler will not prevent the std `Mutex` from holding [all …]
|
| /external/libtextclassifier/abseil-cpp/absl/synchronization/ |
| D | mutex.h | 16 // mutex.h 19 // This header file defines a `Mutex` -- a mutually exclusive lock -- and the 21 // shared resources. A mutex is used to prevent multiple threads from accessing 24 // Unlike a `std::mutex`, the Abseil `Mutex` provides the following additional 26 // * Conditional predicates intrinsic to the `Mutex` object 32 // MutexLock - An RAII wrapper to acquire and release a `Mutex` for exclusive/ 35 // - An RAII wrapper to acquire and release a `Mutex` for shared/read 42 // In addition to simple mutex locks, this file also defines ways to perform 46 // depends on state protected by the `Mutex` to become true. 53 // Mutexes and mutex behavior can be quite complicated. The information within [all …]
|
| /external/angle/third_party/abseil-cpp/absl/synchronization/ |
| D | mutex.h | 16 // mutex.h 19 // This header file defines a `Mutex` -- a mutually exclusive lock -- and the 21 // shared resources. A mutex is used to prevent multiple threads from accessing 24 // Unlike a `std::mutex`, the Abseil `Mutex` provides the following additional 26 // * Conditional predicates intrinsic to the `Mutex` object 32 // MutexLock - An RAII wrapper to acquire and release a `Mutex` for exclusive/ 36 // - An RAII wrapper to acquire and release a `Mutex` for shared/read 43 // In addition to simple mutex locks, this file also defines ways to perform 47 // depends on state protected by the `Mutex` to become true. 54 // Mutexes and mutex behavior can be quite complicated. The information within [all …]
|
| /external/cronet/third_party/abseil-cpp/absl/synchronization/ |
| D | mutex.h | 16 // mutex.h 19 // This header file defines a `Mutex` -- a mutually exclusive lock -- and the 21 // shared resources. A mutex is used to prevent multiple threads from accessing 24 // Unlike a `std::mutex`, the Abseil `Mutex` provides the following additional 26 // * Conditional predicates intrinsic to the `Mutex` object 32 // MutexLock - An RAII wrapper to acquire and release a `Mutex` for exclusive/ 36 // - An RAII wrapper to acquire and release a `Mutex` for shared/read 43 // In addition to simple mutex locks, this file also defines ways to perform 47 // depends on state protected by the `Mutex` to become true. 54 // Mutexes and mutex behavior can be quite complicated. The information within [all …]
|
| /external/angle/src/libANGLE/ |
| D | SharedContextMutex.cpp | 67 void ScopedContextMutexAddRefLock::lock(ContextMutex *mutex) in lock() argument 69 ASSERT(mutex != nullptr); in lock() 71 mMutex = mutex; in lock() 74 // This lock alone must not cause mutex destruction in lock() 120 template <class Mutex> 121 bool SharedContextMutex<Mutex>::try_lock() in try_lock() 127 template <class Mutex> 128 void SharedContextMutex<Mutex>::lock() in lock() 134 template <class Mutex> 135 void SharedContextMutex<Mutex>::unlock() in unlock() [all …]
|
| /external/rust/crates/parking_lot/src/ |
| D | mutex.rs | 13 /// This mutex will block threads waiting for the lock to become available. The 14 /// mutex can be statically initialized or created by the `new` 15 /// constructor. Each mutex has a type parameter which represents the data that 18 /// ever accessed when the mutex is locked. 23 /// quickly acquires and releases the same mutex in succession, which can starve 24 /// other threads waiting to acquire the mutex. While this improves throughput 26 /// a mutex it has just released, this can starve other threads. 28 /// This mutex uses [eventual fairness](https://trac.webkit.org/changeset/203350) 31 /// which will force the lock to go to the next thread waiting for the mutex. 38 /// unlocking a mutex instead of simply dropping the `MutexGuard`. [all …]
|
| /external/jemalloc_new/include/jemalloc/internal/ |
| D | mutex.h | 10 /* Can only acquire one mutex of a given witness rank at a time. */ 25 * bouncing: the data is not touched by the mutex holder 27 * contenders. Having it before the mutex itself could 106 WITNESS_INITIALIZER("mutex", WITNESS_RANK_OMIT)} 110 WITNESS_INITIALIZER("mutex", WITNESS_RANK_OMIT)} 114 WITNESS_INITIALIZER("mutex", WITNESS_RANK_OMIT)} 119 WITNESS_INITIALIZER("mutex", WITNESS_RANK_OMIT)} 129 bool malloc_mutex_init(malloc_mutex_t *mutex, const char *name, 131 void malloc_mutex_prefork(tsdn_t *tsdn, malloc_mutex_t *mutex); 132 void malloc_mutex_postfork_parent(tsdn_t *tsdn, malloc_mutex_t *mutex); [all …]
|