/external/python/cpython2/Python/ |
D | thread_lwp.h | 9 struct lock { struct 63 struct lock *lock; in PyThread_allocate_lock() local 70 lock = (struct lock *) malloc(sizeof(struct lock)); in PyThread_allocate_lock() 71 lock->lock_locked = 0; in PyThread_allocate_lock() 72 (void) mon_create(&lock->lock_monitor); in PyThread_allocate_lock() 73 (void) cv_create(&lock->lock_condvar, lock->lock_monitor); in PyThread_allocate_lock() 74 dprintf(("PyThread_allocate_lock() -> %p\n", lock)); in PyThread_allocate_lock() 75 return (PyThread_type_lock) lock; in PyThread_allocate_lock() 78 void PyThread_free_lock(PyThread_type_lock lock) in PyThread_free_lock() argument 80 dprintf(("PyThread_free_lock(%p) called\n", lock)); in PyThread_free_lock() [all …]
|
D | thread_atheos.h | 156 fastmutex_t *lock; in PyThread_allocate_lock() local 166 lock = (fastmutex_t *) malloc(sizeof(fastmutex_t)); in PyThread_allocate_lock() 167 if (lock == NULL) { in PyThread_allocate_lock() 176 if (fastmutex_create(name, lock) < 0) { in PyThread_allocate_lock() 179 free(lock); in PyThread_allocate_lock() 180 lock = NULL; in PyThread_allocate_lock() 182 dprintf(("PyThread_allocate_lock()-> %p\n", lock)); in PyThread_allocate_lock() 183 return (PyThread_type_lock) lock; in PyThread_allocate_lock() 197 void PyThread_free_lock(PyThread_type_lock lock) in PyThread_free_lock() argument 199 dprintf(("PyThread_free_lock(%p) called\n", lock)); in PyThread_free_lock() [all …]
|
D | thread_pthread.h | 259 sem_t *lock; in PyThread_allocate_lock() local 266 lock = (sem_t *)malloc(sizeof(sem_t)); in PyThread_allocate_lock() 268 if (lock) { in PyThread_allocate_lock() 269 status = sem_init(lock,0,1); in PyThread_allocate_lock() 273 free((void *)lock); in PyThread_allocate_lock() 274 lock = NULL; in PyThread_allocate_lock() 278 dprintf(("PyThread_allocate_lock() -> %p\n", lock)); in PyThread_allocate_lock() 279 return (PyThread_type_lock)lock; in PyThread_allocate_lock() 283 PyThread_free_lock(PyThread_type_lock lock) in PyThread_free_lock() argument 285 sem_t *thelock = (sem_t *)lock; in PyThread_free_lock() [all …]
|
D | thread_cthread.h | 68 mutex_t lock; in PyThread_allocate_lock() local 74 lock = mutex_alloc(); in PyThread_allocate_lock() 75 if (mutex_init(lock)) { in PyThread_allocate_lock() 77 free((void *) lock); in PyThread_allocate_lock() 78 lock = 0; in PyThread_allocate_lock() 80 dprintf(("PyThread_allocate_lock() -> %p\n", lock)); in PyThread_allocate_lock() 81 return (PyThread_type_lock) lock; in PyThread_allocate_lock() 85 PyThread_free_lock(PyThread_type_lock lock) in PyThread_free_lock() argument 87 dprintf(("PyThread_free_lock(%p) called\n", lock)); in PyThread_free_lock() 88 mutex_free(lock); in PyThread_free_lock() [all …]
|
/external/libevent/ |
D | evthread.c | 118 target->lock == cbs->lock && in evthread_set_lock_callbacks() 127 if (cbs->alloc && cbs->free && cbs->lock && cbs->unlock) { in evthread_set_lock_callbacks() 191 void *lock; member 201 if (!(result->lock = original_lock_fns_.alloc( in debug_lock_alloc() 207 result->lock = NULL; in debug_lock_alloc() 219 struct debug_lock *lock = lock_; in debug_lock_free() local 220 EVUTIL_ASSERT(lock->count == 0); in debug_lock_free() 221 EVUTIL_ASSERT(locktype == lock->locktype); in debug_lock_free() 222 EVUTIL_ASSERT(DEBUG_LOCK_SIG == lock->signature); in debug_lock_free() 224 original_lock_fns_.free(lock->lock, in debug_lock_free() [all …]
|
/external/rust/crates/grpcio-sys/grpc/src/core/lib/iomgr/ |
D | combiner.cc | 48 static void combiner_exec(grpc_core::Combiner* lock, grpc_closure* closure, 50 static void combiner_finally_exec(grpc_core::Combiner* lock, 56 grpc_core::Combiner* lock = new grpc_core::Combiner(); in grpc_combiner_create() local 57 gpr_ref_init(&lock->refs, 1); in grpc_combiner_create() 58 gpr_atm_no_barrier_store(&lock->state, STATE_UNORPHANED); in grpc_combiner_create() 59 grpc_closure_list_init(&lock->final_list); in grpc_combiner_create() 60 GRPC_CLOSURE_INIT(&lock->offload, offload, lock, nullptr); in grpc_combiner_create() 61 GRPC_COMBINER_TRACE(gpr_log(GPR_INFO, "C:%p create", lock)); in grpc_combiner_create() 62 return lock; in grpc_combiner_create() 65 static void really_destroy(grpc_core::Combiner* lock) { in really_destroy() argument [all …]
|
/external/grpc-grpc/src/core/lib/iomgr/ |
D | combiner.cc | 78 grpc_combiner* lock = static_cast<grpc_combiner*>(gpr_zalloc(sizeof(*lock))); in grpc_combiner_create() local 79 gpr_ref_init(&lock->refs, 1); in grpc_combiner_create() 80 lock->scheduler.vtable = &scheduler; in grpc_combiner_create() 81 lock->finally_scheduler.vtable = &finally_scheduler; in grpc_combiner_create() 82 gpr_atm_no_barrier_store(&lock->state, STATE_UNORPHANED); in grpc_combiner_create() 83 gpr_mpscq_init(&lock->queue); in grpc_combiner_create() 84 grpc_closure_list_init(&lock->final_list); in grpc_combiner_create() 85 GRPC_CLOSURE_INIT(&lock->offload, offload, lock, in grpc_combiner_create() 87 GRPC_COMBINER_TRACE(gpr_log(GPR_INFO, "C:%p create", lock)); in grpc_combiner_create() 88 return lock; in grpc_combiner_create() [all …]
|
/external/libiio/src/ |
D | lock.c | 34 CRITICAL_SECTION lock; 36 pthread_mutex_t lock; 43 struct iio_mutex *lock = malloc(sizeof(*lock)); in iio_mutex_create() local 45 if (!lock) in iio_mutex_create() 50 InitializeCriticalSection(&lock->lock); in iio_mutex_create() 52 pthread_mutex_init(&lock->lock, NULL); in iio_mutex_create() 55 return lock; in iio_mutex_create() 58 void iio_mutex_destroy(struct iio_mutex *lock) in iio_mutex_destroy() argument 62 DeleteCriticalSection(&lock->lock); in iio_mutex_destroy() 64 pthread_mutex_destroy(&lock->lock); in iio_mutex_destroy() [all …]
|
/external/guava/guava-tests/test/com/google/common/util/concurrent/ |
D | CycleDetectingLockFactoryTest.java | 97 lockA.lock(); in testDeadlock_twoLocks() 98 lockB.lock(); in testDeadlock_twoLocks() 104 lockB.lock(); in testDeadlock_twoLocks() 106 lockA.lock(); in testDeadlock_twoLocks() 115 lockA.lock(); in testDeadlock_twoLocks() 125 lockA.lock(); in testDeadlock_twoLocks() 131 lockA.lock(); in testDeadlock_threeLocks() 132 lockB.lock(); in testDeadlock_threeLocks() 137 lockB.lock(); in testDeadlock_threeLocks() 138 lockC.lock(); in testDeadlock_threeLocks() [all …]
|
/external/guava/android/guava-tests/test/com/google/common/util/concurrent/ |
D | CycleDetectingLockFactoryTest.java | 97 lockA.lock(); in testDeadlock_twoLocks() 98 lockB.lock(); in testDeadlock_twoLocks() 104 lockB.lock(); in testDeadlock_twoLocks() 106 lockA.lock(); in testDeadlock_twoLocks() 115 lockA.lock(); in testDeadlock_twoLocks() 125 lockA.lock(); in testDeadlock_twoLocks() 131 lockA.lock(); in testDeadlock_threeLocks() 132 lockB.lock(); in testDeadlock_threeLocks() 137 lockB.lock(); in testDeadlock_threeLocks() 138 lockC.lock(); in testDeadlock_threeLocks() [all …]
|
/external/linux-kselftest/tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/ |
D | locks.h | 26 static inline void lock_impl_lock(struct lock_impl *lock) in lock_impl_lock() argument 28 BUG_ON(pthread_mutex_lock(&lock->mutex)); in lock_impl_lock() 31 static inline void lock_impl_unlock(struct lock_impl *lock) in lock_impl_unlock() argument 33 BUG_ON(pthread_mutex_unlock(&lock->mutex)); in lock_impl_unlock() 36 static inline bool lock_impl_trylock(struct lock_impl *lock) in lock_impl_trylock() argument 38 int err = pthread_mutex_trylock(&lock->mutex); in lock_impl_trylock() 47 static inline void lock_impl_init(struct lock_impl *lock) in lock_impl_init() argument 49 pthread_mutex_init(&lock->mutex, NULL); in lock_impl_init() 61 static inline bool lock_impl_trylock(struct lock_impl *lock) in lock_impl_trylock() argument 65 return __sync_bool_compare_and_swap(&lock->locked, false, true); in lock_impl_trylock() [all …]
|
/external/llvm-project/clang-tools-extra/test/clang-tidy/checkers/ |
D | bugprone-spuriously-wake-up-functions.c | 20 static mtx_t lock; variable 27 if (0 != cnd_wait(&condition_c, &lock)) { in consume_list_element() 32 if (0 != cnd_wait(&condition_c, &lock)) in consume_list_element() 35 if (list_c.next == NULL && 0 != cnd_wait(&condition_c, &lock)) in consume_list_element() 39 if (0 != cnd_wait(&condition_c, &lock)) { in consume_list_element() 43 if (0 != cnd_wait(&condition_c, &lock)) { in consume_list_element() 46 if (0 != cnd_wait(&condition_c, &lock)) in consume_list_element() 49 cnd_wait(&condition_c, &lock); in consume_list_element() 53 cnd_wait(&condition_c, &lock); in consume_list_element() 56 cnd_wait(&condition_c, &lock); in consume_list_element() [all …]
|
/external/swiftshader/src/Vulkan/Debug/ |
D | Thread.cpp | 31 marl::lock lock(mutex); in setName() local 37 marl::lock lock(mutex); in name() local 41 void Thread::onLocationUpdate(marl::lock &lock) in onLocationUpdate() argument 58 lock.wait(stateCV, [this]() REQUIRES(mutex) { return state_ != State::Paused; }); in onLocationUpdate() 67 auto frame = pauseAtFrame.lock(); in onLocationUpdate() 80 lock.wait(stateCV, [this]() REQUIRES(mutex) { return state_ != State::Paused; }); in onLocationUpdate() 95 auto lock = ctx->lock(); in enter() local 96 frame = lock.createFrame(file, function); in enter() 97 isFunctionBreakpoint = lock.isFunctionBreakpoint(function); in enter() 101 marl::lock lock(mutex); in enter() local [all …]
|
/external/libchrome/base/synchronization/ |
D | lock_unittest.cc | 21 explicit BasicLockTestThread(Lock* lock) : lock_(lock), acquired_(0) {} in BasicLockTestThread() argument 54 Lock lock; in TEST() local 55 BasicLockTestThread thread(&lock); in TEST() 62 lock.Acquire(); in TEST() 64 lock.Release(); in TEST() 67 lock.Acquire(); in TEST() 70 lock.Release(); in TEST() 73 if (lock.Try()) { in TEST() 76 lock.Release(); in TEST() 80 lock.Acquire(); in TEST() [all …]
|
/external/guava/android/guava/src/com/google/common/util/concurrent/ |
D | Monitor.java | 319 this.condition = monitor.lock.newCondition(); in Guard() 334 private final ReentrantLock lock; field in Monitor 359 this.lock = new ReentrantLock(fair); in Monitor() 364 lock.lock(); in enter() 375 final ReentrantLock lock = this.lock; in enter() local 376 if (!fair && lock.tryLock()) { in enter() 384 return lock.tryLock(remainingNanos, TimeUnit.NANOSECONDS); in enter() 403 lock.lockInterruptibly(); in enterInterruptibly() 414 return lock.tryLock(time, unit); in enterInterruptibly() 425 return lock.tryLock(); in tryEnter() [all …]
|
/external/curl/tests/data/ |
D | test1554 | 22 -> Mutex lock 24 -> Mutex lock 26 -> Mutex lock 28 -> Mutex lock 30 -> Mutex lock 32 -> Mutex lock 34 -> Mutex lock 36 -> Mutex lock 39 -> Mutex lock 41 -> Mutex lock [all …]
|
/external/swiftshader/third_party/marl/src/ |
D | conditionvariable_test.cpp | 30 marl::lock lock(mutex); in TEST_F() local 31 cv.wait(lock, [&] { in TEST_F() 32 EXPECT_TRUE(lock.owns_lock()); in TEST_F() 35 EXPECT_TRUE(lock.owns_lock()); in TEST_F() 47 marl::lock lock(mutex); in TEST_F() local 50 cv.wait(lock, [&] { in TEST_F() 51 EXPECT_TRUE(lock.owns_lock()); in TEST_F() 54 EXPECT_TRUE(lock.owns_lock()); in TEST_F() 73 marl::lock lock(mutex); in TEST_P() local 74 cv.wait(lock, [&] { in TEST_P() [all …]
|
/external/sfntly/cpp/src/test/ |
D | lock_test.cc | 29 BasicLockTestThread(Lock* lock) : lock_(lock), acquired_(0) {} in BasicLockTestThread() argument 62 Lock lock; in BasicLockTest() local 63 BasicLockTestThread thread(&lock); in BasicLockTest() 70 lock.Acquire(); in BasicLockTest() 72 lock.Unlock(); in BasicLockTest() 75 lock.Acquire(); in BasicLockTest() 78 lock.Unlock(); in BasicLockTest() 81 if (lock.Try()) { in BasicLockTest() 84 lock.Unlock(); in BasicLockTest() 88 lock.Acquire(); in BasicLockTest() [all …]
|
/external/guava/guava/src/com/google/common/util/concurrent/ |
D | Monitor.java | 322 this.condition = monitor.lock.newCondition(); in Guard() 337 private final ReentrantLock lock; field in Monitor 362 this.lock = new ReentrantLock(fair); in Monitor() 384 lock.lock(); 405 final ReentrantLock lock = this.lock; 406 if (!fair && lock.tryLock()) { 414 return lock.tryLock(remainingNanos, TimeUnit.NANOSECONDS); 433 lock.lockInterruptibly(); 455 return lock.tryLock(time, unit); 466 return lock.tryLock(); [all …]
|
/external/androidplot/AndroidPlot-Core/src/main/java/com/androidplot/xy/ |
D | SimpleXYSeries.java | 40 lock.readLock().lock(); in onBeforeDraw() 45 lock.readLock().unlock(); in onAfterDraw() 56 private ReentrantReadWriteLock lock = new ReentrantReadWriteLock(true); field in SimpleXYSeries 95 lock.writeLock().lock(); in useImplicitXVals() 99 lock.writeLock().unlock(); in useImplicitXVals() 111 lock.writeLock().lock(); in setModel() 155 lock.writeLock().unlock(); in setModel() 165 lock.writeLock().lock(); in setX() 169 lock.writeLock().unlock(); in setX() 179 lock.writeLock().lock(); in setY() [all …]
|
/external/python/cpython2/Lib/test/ |
D | lock_tests.py | 76 lock = self.locktype() 77 del lock 80 lock = self.locktype() 81 lock.acquire() 82 del lock 85 lock = self.locktype() 86 lock.acquire() 87 lock.release() 88 del lock 91 lock = self.locktype() [all …]
|
/external/llvm-project/llvm/test/CodeGen/X86/ |
D | atomic8.ll | 12 ; X64: lock 14 ; X32: lock 17 ; X64: lock 19 ; X32: lock 22 ; X64: lock 24 ; X32: lock 27 ; X64: lock 29 ; X32: lock 40 ; X64: lock 42 ; X32: lock [all …]
|
/external/llvm/test/CodeGen/X86/ |
D | atomic8.ll | 12 ; X64: lock 14 ; X32: lock 17 ; X64: lock 19 ; X32: lock 22 ; X64: lock 24 ; X32: lock 27 ; X64: lock 29 ; X32: lock 40 ; X64: lock 42 ; X32: lock [all …]
|
/external/rust/crates/quiche/deps/boringssl/src/crypto/ |
D | thread_pthread.c | 34 void CRYPTO_MUTEX_init(CRYPTO_MUTEX *lock) { in CRYPTO_MUTEX_init() argument 35 if (pthread_rwlock_init((pthread_rwlock_t *) lock, NULL) != 0) { in CRYPTO_MUTEX_init() 40 void CRYPTO_MUTEX_lock_read(CRYPTO_MUTEX *lock) { in CRYPTO_MUTEX_lock_read() argument 41 if (pthread_rwlock_rdlock((pthread_rwlock_t *) lock) != 0) { in CRYPTO_MUTEX_lock_read() 46 void CRYPTO_MUTEX_lock_write(CRYPTO_MUTEX *lock) { in CRYPTO_MUTEX_lock_write() argument 47 if (pthread_rwlock_wrlock((pthread_rwlock_t *) lock) != 0) { in CRYPTO_MUTEX_lock_write() 52 void CRYPTO_MUTEX_unlock_read(CRYPTO_MUTEX *lock) { in CRYPTO_MUTEX_unlock_read() argument 53 if (pthread_rwlock_unlock((pthread_rwlock_t *) lock) != 0) { in CRYPTO_MUTEX_unlock_read() 58 void CRYPTO_MUTEX_unlock_write(CRYPTO_MUTEX *lock) { in CRYPTO_MUTEX_unlock_write() argument 59 if (pthread_rwlock_unlock((pthread_rwlock_t *) lock) != 0) { in CRYPTO_MUTEX_unlock_write() [all …]
|
/external/boringssl/src/crypto/ |
D | thread_pthread.c | 34 void CRYPTO_MUTEX_init(CRYPTO_MUTEX *lock) { in CRYPTO_MUTEX_init() argument 35 if (pthread_rwlock_init((pthread_rwlock_t *) lock, NULL) != 0) { in CRYPTO_MUTEX_init() 40 void CRYPTO_MUTEX_lock_read(CRYPTO_MUTEX *lock) { in CRYPTO_MUTEX_lock_read() argument 41 if (pthread_rwlock_rdlock((pthread_rwlock_t *) lock) != 0) { in CRYPTO_MUTEX_lock_read() 46 void CRYPTO_MUTEX_lock_write(CRYPTO_MUTEX *lock) { in CRYPTO_MUTEX_lock_write() argument 47 if (pthread_rwlock_wrlock((pthread_rwlock_t *) lock) != 0) { in CRYPTO_MUTEX_lock_write() 52 void CRYPTO_MUTEX_unlock_read(CRYPTO_MUTEX *lock) { in CRYPTO_MUTEX_unlock_read() argument 53 if (pthread_rwlock_unlock((pthread_rwlock_t *) lock) != 0) { in CRYPTO_MUTEX_unlock_read() 58 void CRYPTO_MUTEX_unlock_write(CRYPTO_MUTEX *lock) { in CRYPTO_MUTEX_unlock_write() argument 59 if (pthread_rwlock_unlock((pthread_rwlock_t *) lock) != 0) { in CRYPTO_MUTEX_unlock_write() [all …]
|