/external/valgrind/drd/tests/ |
boost_thread.cpp | 2 // use the boost::thread, boost::mutex and boost::condition classes. 6 #include <boost/thread/mutex.hpp> 12 static boost::mutex s_m; 18 boost::mutex::scoped_lock sl(s_m); 26 boost::mutex::scoped_lock sl(s_m);
|
free_is_write.c | 17 // 'mutex' protects 'count'. 18 static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; variable 33 pthread_mutex_lock(&mutex); 36 pthread_mutex_unlock(&mutex); 56 pthread_mutex_lock(&mutex); 57 while (count < THREAD_COUNT && pthread_cond_wait(&cond, &mutex) == 0) 59 pthread_mutex_unlock(&mutex);
|
recursive_mutex.c | 1 /** Initialize several kinds of mutexes and lock each mutex twice. 2 * Note: locking a regular mutex twice causes a deadlock. 31 fprintf(stderr, "Recursive mutex (statically initialized).\n"); 41 fprintf(stderr, "\nRecursive mutex (initialized via mutex attributes).\n"); 55 fprintf(stderr, "\nError checking mutex.\n"); 68 fprintf(stderr, "\nNon-recursive mutex.\n");
|
/toolchain/binutils/binutils-2.25/gas/testsuite/gas/ia64/ |
dv-mutex-err.s | 2 // Test mutex relation handling 11 .pred.rel.mutex p1, p2 17 .pred.rel.mutex p1, p2 23 .pred.rel.mutex p1, p2 29 .pred.rel.mutex p1, p2
|
pred-rel.s | 3 .pred.rel "mutex", p1, p2 7 .pred.rel "mutex" p1, p2 11 .pred.rel.mutex p1, p2 15 .pred.rel @mutex, p1, p2 19 .pred.rel @mutex p1, p2
|
/external/guava/guava-tests/test/com/google/common/collect/ |
SynchronizedNavigableMapTest.java | 49 TestMap<K, V> inner = new TestMap<K, V>(innermost, mutex); 50 NavigableMap<K, V> outer = Synchronized.navigableMap(inner, mutex); 57 private final Object mutex; field in class:SynchronizedNavigableMapTest.TestEntry 59 TestEntry(Entry<K, V> delegate, Object mutex) { 61 this.mutex = mutex; 69 assertTrue(Thread.holdsLock(mutex)); 74 assertTrue(Thread.holdsLock(mutex)); 79 assertTrue(Thread.holdsLock(mutex)); 84 assertTrue(Thread.holdsLock(mutex)); [all...] |
SynchronizedMapTest.java | 39 public final Object mutex = new Integer(1); // something Serializable field in class:SynchronizedMapTest 42 TestMap<K, V> inner = new TestMap<K, V>(new HashMap<K, V>(), mutex); 43 Map<K, V> outer = Synchronized.map(inner, mutex); 49 public final Object mutex; field in class:SynchronizedMapTest.TestMap 51 public TestMap(Map<K, V> delegate, Object mutex) { 52 checkNotNull(mutex); 54 this.mutex = mutex; 62 assertTrue(Thread.holdsLock(mutex)); 67 assertTrue(Thread.holdsLock(mutex)); [all...] |
/external/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.mod/ |
nonmember_swap.pass.cpp | 14 // template <class Mutex> class shared_lock; 16 // template <class Mutex> 17 // void swap(shared_lock<Mutex>& x, shared_lock<Mutex>& y) noexcept; 24 struct mutex struct 30 mutex m; 37 std::shared_lock<mutex> lk1(m); 38 std::shared_lock<mutex> lk2; 40 assert(lk1.mutex() == nullptr); 42 assert(lk2.mutex() == &m) [all...] |
/external/valgrind/drd/ |
drd_mutex.h | 39 struct mutex_info* DRD_(mutex_init)(const Addr mutex, const MutexT mutex_type); 40 void DRD_(mutex_ignore_ordering)(const Addr mutex); 41 void DRD_(mutex_post_destroy)(const Addr mutex); 42 void DRD_(not_a_mutex)(const Addr mutex); 43 struct mutex_info* DRD_(mutex_get)(const Addr mutex); 44 void DRD_(mutex_pre_lock)(const Addr mutex, const MutexT mutex_type, 46 void DRD_(mutex_post_lock)(const Addr mutex, const Bool took_lock, 48 void DRD_(mutex_unlock)(const Addr mutex, const MutexT mutex_type); 52 Bool DRD_(mutex_is_locked_by)(const Addr mutex, const DrdThreadId tid); 53 int DRD_(mutex_get_recursion_count)(const Addr mutex); [all...] |
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.mod/ |
nonmember_swap.pass.cpp | 12 // template <class Mutex> class shared_lock; 14 // template <class Mutex> 15 // void swap(shared_lock<Mutex>& x, shared_lock<Mutex>& y) noexcept; 22 struct mutex struct 28 mutex m; 35 std::shared_lock<mutex> lk1(m); 36 std::shared_lock<mutex> lk2; 38 assert(lk1.mutex() == nullptr); 40 assert(lk2.mutex() == &m) [all...] |
/prebuilts/gdb/darwin-x86/lib/python2.7/ |
mutex.py | 3 A mutex has two pieces of state -- a 'locked' bit and a queue. 4 When the mutex is not locked, the queue is empty. 7 When the mutex is unlocked while the queue is not empty, 15 warnpy3k("the mutex module has been removed in Python 3.0", stacklevel=2) 20 class mutex: class in inherits: 22 """Create a new mutex -- initially unlocked.""" 27 """Test the locked bit of the mutex.""" 40 """Lock a mutex, call the function with supplied argument 41 when it is acquired. If the mutex is already locked, place 49 """Unlock a mutex. If the queue is not empty, call the nex [all...] |
/prebuilts/gdb/linux-x86/lib/python2.7/ |
mutex.py | 3 A mutex has two pieces of state -- a 'locked' bit and a queue. 4 When the mutex is not locked, the queue is empty. 7 When the mutex is unlocked while the queue is not empty, 15 warnpy3k("the mutex module has been removed in Python 3.0", stacklevel=2) 20 class mutex: class in inherits: 22 """Create a new mutex -- initially unlocked.""" 27 """Test the locked bit of the mutex.""" 40 """Lock a mutex, call the function with supplied argument 41 when it is acquired. If the mutex is already locked, place 49 """Unlock a mutex. If the queue is not empty, call the nex [all...] |
/prebuilts/python/darwin-x86/2.7.5/lib/python2.7/ |
mutex.py | 3 A mutex has two pieces of state -- a 'locked' bit and a queue. 4 When the mutex is not locked, the queue is empty. 7 When the mutex is unlocked while the queue is not empty, 15 warnpy3k("the mutex module has been removed in Python 3.0", stacklevel=2) 20 class mutex: class in inherits: 22 """Create a new mutex -- initially unlocked.""" 27 """Test the locked bit of the mutex.""" 40 """Lock a mutex, call the function with supplied argument 41 when it is acquired. If the mutex is already locked, place 49 """Unlock a mutex. If the queue is not empty, call the nex [all...] |
/prebuilts/python/linux-x86/2.7.5/lib/python2.7/ |
mutex.py | 3 A mutex has two pieces of state -- a 'locked' bit and a queue. 4 When the mutex is not locked, the queue is empty. 7 When the mutex is unlocked while the queue is not empty, 15 warnpy3k("the mutex module has been removed in Python 3.0", stacklevel=2) 20 class mutex: class in inherits: 22 """Create a new mutex -- initially unlocked.""" 27 """Test the locked bit of the mutex.""" 40 """Lock a mutex, call the function with supplied argument 41 when it is acquired. If the mutex is already locked, place 49 """Unlock a mutex. If the queue is not empty, call the nex [all...] |
/external/deqp/framework/delibs/dethread/win32/ |
deMutexWin32.c | 21 * \brief Win32 implementation of mutex. 65 void deMutex_destroy (deMutex mutex) 67 DeleteCriticalSection((CRITICAL_SECTION*)mutex); 68 deFree((CRITICAL_SECTION*)mutex); 71 void deMutex_lock (deMutex mutex) 73 EnterCriticalSection((CRITICAL_SECTION*)mutex); 76 void deMutex_unlock (deMutex mutex) 78 LeaveCriticalSection((CRITICAL_SECTION*)mutex); 81 deBool deMutex_tryLock (deMutex mutex) 83 return TryEnterCriticalSection((CRITICAL_SECTION*)mutex) == TRUE [all...] |
/system/core/include/utils/ |
Mutex.h | 40 * doesn't build for Win32 should use std::mutex and std::lock_guard instead. 42 * Simple mutex class. The implementation is system-dependent. 44 * The mutex must be unlocked by the thread that locked it. They are not 47 class Mutex { 54 Mutex(); 55 Mutex(const char* name); 56 Mutex(int type, const char* name = NULL); 57 ~Mutex(); 59 // lock or unlock the mutex 67 // Lock the mutex, but don't wait longer than timeoutNs (relative time) [all...] |
/external/deqp/framework/delibs/dethread/unix/ |
deMutexUnix.c | 21 * \brief Unix implementation of mutex. 32 /* \todo [2009-11-12 pyry] It is quite nasty to allocate mutex structs from heap. */ 40 pthread_mutex_t* mutex = deMalloc(sizeof(pthread_mutex_t)); local 42 if (!mutex) 47 deFree(mutex); 58 deFree(mutex); 69 deFree(mutex); 75 ret = pthread_mutex_init(mutex, &attr); 79 deFree(mutex); 85 return (deMutex)mutex; [all...] |
/external/compiler-rt/test/tsan/ |
signal_cond.cc | 12 pthread_mutex_t mutex; variable 22 pthread_mutex_lock(&mutex); 24 pthread_cond_wait(&cond, &mutex); 25 pthread_mutex_unlock(&mutex); 32 pthread_mutex_init(&mutex, 0); 43 pthread_mutex_lock(&mutex); 46 pthread_mutex_unlock(&mutex);
|
/external/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.guard/ |
assign.fail.cpp | 10 // <mutex> 12 // template <class Mutex> class lock_guard; 16 #include <mutex> 20 std::mutex m0; 21 std::mutex m1; 22 std::lock_guard<std::mutex> lg0(m0); 23 std::lock_guard<std::mutex> lg(m1);
|
/external/libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/ |
assign.fail.cpp | 10 // <mutex> 12 // class mutex; 14 // mutex& operator=(const mutex&) = delete; 16 #include <mutex> 20 std::mutex m0; 21 std::mutex m1;
|
copy.fail.cpp | 10 // <mutex> 12 // class mutex; 14 // mutex(const mutex&) = delete; 16 #include <mutex> 20 std::mutex m0; 21 std::mutex m1(m0);
|
/external/llvm/lib/Support/ |
Mutex.cpp | 1 //===- Mutex.cpp - Mutual Exclusion Lock ------------------------*- C++ -*-===// 10 // This file implements the llvm::sys::Mutex class. 15 #include "llvm/Support/Mutex.h" 43 // Construct a Mutex using pthread calls 48 pthread_mutex_t* mutex = 52 // Initialize the mutex attributes 56 // Initialize the mutex as a recursive mutex, if requested, or normal 62 // Initialize the mutex 63 errorcode = pthread_mutex_init(mutex, &attr) [all...] |
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.lock/thread.lock.guard/ |
assign.fail.cpp | 10 // <mutex> 12 // template <class Mutex> class lock_guard; 16 #include <mutex> 20 std::mutex m0; 21 std::mutex m1; 22 std::lock_guard<std::mutex> lg0(m0); 23 std::lock_guard<std::mutex> lg(m1);
|
/ndk/sources/cxx-stl/llvm-libc++/libcxx/test/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/ |
assign.fail.cpp | 10 // <mutex> 12 // class mutex; 14 // mutex& operator=(const mutex&) = delete; 16 #include <mutex> 20 std::mutex m0; 21 std::mutex m1;
|
copy.fail.cpp | 10 // <mutex> 12 // class mutex; 14 // mutex(const mutex&) = delete; 16 #include <mutex> 20 std::mutex m0; 21 std::mutex m1(m0);
|