/external/libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.scoped/ |
H A D | adopt_lock.pass.cpp | 24 bool locked = false; member in struct:TestMutex 27 void lock() { assert(!locked); locked = true; } 28 bool try_lock() { if (locked) return false; locked = true; return true; } 29 void unlock() { assert(locked); locked = false; } 47 assert(m1.locked); 49 assert(!m1.locked); 57 assert(m1.locked [all...] |
H A D | mutex.pass.cpp | 24 bool locked = false; member in struct:TestMutex 26 ~TestMutex() { assert(!locked); } 28 void lock() { assert(!locked); locked = true; } 29 bool try_lock() { if (locked) return false; locked = true; return true; } 30 void unlock() { assert(locked); locked = false; } 38 bool locked = false; member in struct:TestMutexThrows 42 ~TestMutexThrows() { assert(!locked); } [all...] |
/external/llvm/include/llvm/Support/ |
H A D | UniqueLock.h | 10 // This file defines a guard for a block of code that ensures a Mutex is locked 23 /// an associated mutex, which is guaranteed to be locked upon creation 30 bool locked; member in class:llvm::unique_lock 35 unique_lock() : M(nullptr), locked(false) {} 36 explicit unique_lock(MutexT &m) : M(&m), locked(true) { M->lock(); } 42 locked = o.locked; 44 o.locked = false; 50 assert(!locked && "mutex already locked!"); [all...] |
/external/swiftshader/third_party/llvm-subzero/include/llvm/Support/ |
H A D | UniqueLock.h | 10 // This file defines a guard for a block of code that ensures a Mutex is locked 23 /// an associated mutex, which is guaranteed to be locked upon creation 30 bool locked; member in class:llvm::unique_lock 35 unique_lock() : M(nullptr), locked(false) {} 36 explicit unique_lock(MutexT &m) : M(&m), locked(true) { M->lock(); } 42 locked = o.locked; 44 o.locked = false; 50 assert(!locked && "mutex already locked!"); [all...] |
/external/libcxx/test/std/thread/thread.mutex/thread.lock.algorithm/ |
H A D | try_lock.pass.cpp | 37 bool locked() const {return locked_;} function in class:L0 55 bool locked() const {return locked_;} function in class:L1 73 bool locked() const {return locked_;} function in class:L2 82 assert(l0.locked()); 83 assert(l1.locked()); 89 assert(!l0.locked()); 90 assert(!l1.locked()); 96 assert(!l0.locked()); 97 assert(!l1.locked()); 110 assert(!l0.locked()); [all...] |
H A D | lock.pass.cpp | 47 bool locked() const {return locked_;} function in class:L0 70 bool locked() const {return locked_;} function in class:L1 93 bool locked() const {return locked_;} function in class:L2 102 assert(l0.locked()); 103 assert(l1.locked()); 109 assert(l0.locked()); 110 assert(l1.locked()); 116 assert(l0.locked()); 117 assert(l1.locked()); 130 assert(!l0.locked()); [all...] |
/external/python/cpython2/Lib/ |
H A D | 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. 23 self.locked = False 27 """Test the locked bit of the mutex.""" 28 return self.locked 33 if not self.locked: 34 self.locked = True 41 when it is acquired. If the mutex is already locked, place 55 self.locked = False
|
/external/robolectric/v1/src/main/java/com/xtremelabs/robolectric/shadows/ |
H A D | ShadowPowerManager.java | 34 private boolean locked; field in class:ShadowPowerManager.ShadowWakeLock 47 locked = true; 54 if (--refCount < 0) throw new RuntimeException("WakeLock under-locked"); 56 locked = false; 62 return refCounted ? refCount > 0 : locked;
|
/external/valgrind/drd/tests/ |
H A D | annotate_rwlock.c | 28 volatile int locked; member in struct:__anon29293 41 p->locked = 0; 50 assert(p->locked == 0); 59 while (__sync_val_compare_and_swap(&p->locked, 0, 1) == 1) 69 (void) __sync_fetch_and_sub(&p->locked, 1); 75 (void) __sync_fetch_and_sub(&p->locked, 1); 83 while (__sync_val_compare_and_swap(&p->locked, 0, 1) == 1) 93 (void) __sync_fetch_and_sub(&p->locked, 1); 99 (void) __sync_fetch_and_sub(&p->locked, 1); 105 while (__sync_val_compare_and_swap(&p->locked, [all...] |
/external/valgrind/helgrind/tests/ |
H A D | annotate_rwlock.c | 38 volatile int locked; member in struct:__anon29370 51 p->locked = 0; 60 assert(p->locked == 0); 69 while (__sync_val_compare_and_swap(&p->locked, 0, 1) == 1) 79 (void) __sync_fetch_and_sub(&p->locked, 1); 85 (void) __sync_fetch_and_sub(&p->locked, 1); 94 while (__sync_val_compare_and_swap(&p->locked, 0, 1) == 1) 104 (void) __sync_fetch_and_sub(&p->locked, 1); 110 (void) __sync_fetch_and_sub(&p->locked, 1); 117 while (__sync_val_compare_and_swap(&p->locked, [all...] |
/external/compiler-rt/test/tsan/ |
H A D | real_deadlock_detector_stress_test.cc | 44 std::vector<int> locked; local 47 if (what < 4 && locked.size() < kMaxPerThread) { 50 if (!locked.empty()) { 51 max_locked = *std::max_element(locked.begin(), locked.end()); 122 locked.push_back(id); 123 } else if (what < 9 && !locked.empty()) { 125 int pos = rand_r(&rnd) % locked.size(); 126 int id = locked[pos]; 127 locked[po [all...] |
/external/linux-kselftest/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/ |
H A D | locks.h | 58 bool locked; member in struct:lock_impl 65 return __sync_bool_compare_and_swap(&lock->locked, false, true); 68 bool old_locked = lock->locked; 69 lock->locked = true; 96 BUG_ON(!__sync_bool_compare_and_swap(&lock->locked, true, false)); 102 bool old_locked = lock->locked; 103 lock->locked = false; 112 lock->locked = false; 115 #define LOCK_IMPL_INITIALIZER {.locked = false}
|
/external/desugar/java/com/google/devtools/common/options/ |
H A D | OptionPriority.java | 29 private final boolean locked; field in class:OptionPriority 31 private OptionPriority(PriorityCategory priorityCategory, int index, boolean locked) { argument 34 this.locked = locked; 44 * returned priority would compareTo as after the current one. Does not increment locked 48 if (priority.locked) {
|
/external/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/ |
H A D | wait_terminates.sh.cpp | 79 std::atomic_bool locked; member in class:ThrowingMutex 85 locked = false; 90 locked = true; 97 void unlock() { locked = false; } 98 bool isLocked() const { return locked == true; }
|
/external/parameter-framework/asio/include/asio/detail/ |
H A D | posix_event.hpp | 52 ASIO_ASSERT(lock.locked()); 62 ASIO_ASSERT(lock.locked()); 74 ASIO_ASSERT(lock.locked()); 89 ASIO_ASSERT(lock.locked()); 98 ASIO_ASSERT(lock.locked());
|
/external/parameter-framework/asio-1.10.6/include/asio/detail/ |
H A D | posix_event.hpp | 52 ASIO_ASSERT(lock.locked()); 62 ASIO_ASSERT(lock.locked()); 74 ASIO_ASSERT(lock.locked()); 89 ASIO_ASSERT(lock.locked()); 98 ASIO_ASSERT(lock.locked());
|
/external/toolchain-utils/cros_utils/ |
H A D | locks.py | 16 locked = True 25 locked = False 31 return locked 35 """Release locked machine(s), using AFE server for locking."""
|
/external/toolchain-utils/automation/common/ |
H A D | machine.py | 21 self.locked = False 24 assert not self.locked 27 self.locked = True 36 self.locked = False 46 self.os, 'Uses: %d' % self.uses, 'Locked: %s' % self.locked]) 64 return all([not machine.locked, fnmatch(machine.hostname, self.hostname),
|
/external/mockftpserver/MockFtpServer/src/main/java/org/mockftpserver/core/command/ |
H A D | InvocationRecord.java | 37 * The {@link #lock()} method makes an instance of this class immutable. After an instance is locked,
49 private boolean locked = false;
field in class:InvocationRecord 64 * Lock this instance, making it immutable. After an instance is locked,
69 locked = true;
73 * Return true if this object has been locked, false otherwise. See {@link #lock()}.
75 * @return true if this object has been locked, false otherwise.
78 return locked;
106 * an <code>AssertFailedException</code> if this object has been locked. See {@link #lock()}.
110 * @throws AssertFailedException - if the key is null or this object has been locked.
114 Assert.isFalse(locked, "Th [all...] |
/external/mockftpserver/branches/1.x_Branch/src/main/java/org/mockftpserver/core/command/ |
H A D | InvocationRecord.java | 37 * The {@link #lock()} method makes an instance of this class immutable. After an instance is locked,
50 private boolean locked = false;
field in class:InvocationRecord 64 * Lock this instance, making it immutable. After an instance is locked,
69 locked = true;
73 * Return true if this object has been locked, false otherwise. See {@link #lock()}.
74 * @return true if this object has been locked, false otherwise.
77 return locked;
105 * an <code>AssertFailedException</code> if this object has been locked. See {@link #lock()}.
110 * @throws AssertFailedException - if the key is null or this object has been locked.
114 Assert.isFalse(locked, "Th [all...] |
/external/mockftpserver/tags/1.0/src/main/java/org/mockftpserver/core/command/ |
H A D | InvocationRecord.java | 37 * The {@link #lock()} method makes an instance of this class immutable. After an instance is locked,
50 private boolean locked = false;
field in class:InvocationRecord 64 * Lock this instance, making it immutable. After an instance is locked,
69 locked = true;
73 * Return true if this object has been locked, false otherwise. See {@link #lock()}.
74 * @return true if this object has been locked, false otherwise.
77 return locked;
105 * an <code>AssertFailedException</code> if this object has been locked. See {@link #lock()}.
110 * @throws AssertFailedException - if the key is null or this object has been locked.
114 Assert.isFalse(locked, "Th [all...] |
/external/mockftpserver/tags/1.1/src/main/java/org/mockftpserver/core/command/ |
H A D | InvocationRecord.java | 37 * The {@link #lock()} method makes an instance of this class immutable. After an instance is locked,
50 private boolean locked = false;
field in class:InvocationRecord 64 * Lock this instance, making it immutable. After an instance is locked,
69 locked = true;
73 * Return true if this object has been locked, false otherwise. See {@link #lock()}.
74 * @return true if this object has been locked, false otherwise.
77 return locked;
105 * an <code>AssertFailedException</code> if this object has been locked. See {@link #lock()}.
110 * @throws AssertFailedException - if the key is null or this object has been locked.
114 Assert.isFalse(locked, "Th [all...] |
/external/mockftpserver/tags/1.2/src/main/java/org/mockftpserver/core/command/ |
H A D | InvocationRecord.java | 37 * The {@link #lock()} method makes an instance of this class immutable. After an instance is locked,
50 private boolean locked = false;
field in class:InvocationRecord 64 * Lock this instance, making it immutable. After an instance is locked,
69 locked = true;
73 * Return true if this object has been locked, false otherwise. See {@link #lock()}.
74 * @return true if this object has been locked, false otherwise.
77 return locked;
105 * an <code>AssertFailedException</code> if this object has been locked. See {@link #lock()}.
110 * @throws AssertFailedException - if the key is null or this object has been locked.
114 Assert.isFalse(locked, "Th [all...] |
/external/mockftpserver/tags/1.2.1/src/main/java/org/mockftpserver/core/command/ |
H A D | InvocationRecord.java | 37 * The {@link #lock()} method makes an instance of this class immutable. After an instance is locked,
50 private boolean locked = false;
field in class:InvocationRecord 64 * Lock this instance, making it immutable. After an instance is locked,
69 locked = true;
73 * Return true if this object has been locked, false otherwise. See {@link #lock()}.
74 * @return true if this object has been locked, false otherwise.
77 return locked;
105 * an <code>AssertFailedException</code> if this object has been locked. See {@link #lock()}.
110 * @throws AssertFailedException - if the key is null or this object has been locked.
114 Assert.isFalse(locked, "Th [all...] |
/external/mockftpserver/tags/1.2.2/src/main/java/org/mockftpserver/core/command/ |
H A D | InvocationRecord.java | 37 * The {@link #lock()} method makes an instance of this class immutable. After an instance is locked,
50 private boolean locked = false;
field in class:InvocationRecord 64 * Lock this instance, making it immutable. After an instance is locked,
69 locked = true;
73 * Return true if this object has been locked, false otherwise. See {@link #lock()}.
74 * @return true if this object has been locked, false otherwise.
77 return locked;
105 * an <code>AssertFailedException</code> if this object has been locked. See {@link #lock()}.
110 * @throws AssertFailedException - if the key is null or this object has been locked.
114 Assert.isFalse(locked, "Th [all...] |