/external/bison/lib/glthread/ |
D | lock.c | 38 glthread_rwlock_init_multithreaded (gl_rwlock_t *lock) in glthread_rwlock_init_multithreaded() argument 42 err = pthread_rwlock_init (&lock->rwlock, NULL); in glthread_rwlock_init_multithreaded() 45 lock->initialized = 1; in glthread_rwlock_init_multithreaded() 50 glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock) in glthread_rwlock_rdlock_multithreaded() argument 52 if (!lock->initialized) in glthread_rwlock_rdlock_multithreaded() 56 err = pthread_mutex_lock (&lock->guard); in glthread_rwlock_rdlock_multithreaded() 59 if (!lock->initialized) in glthread_rwlock_rdlock_multithreaded() 61 err = glthread_rwlock_init_multithreaded (lock); in glthread_rwlock_rdlock_multithreaded() 64 pthread_mutex_unlock (&lock->guard); in glthread_rwlock_rdlock_multithreaded() 68 err = pthread_mutex_unlock (&lock->guard); in glthread_rwlock_rdlock_multithreaded() [all …]
|
/external/libevent/ |
D | evthread.c | 91 target->lock == cbs->lock && in evthread_set_lock_callbacks() 100 if (cbs->alloc && cbs->free && cbs->lock && cbs->unlock) { in evthread_set_lock_callbacks() 155 void *lock; member 165 if (!(result->lock = _original_lock_fns.alloc( in debug_lock_alloc() 171 result->lock = NULL; in debug_lock_alloc() 182 struct debug_lock *lock = lock_; in debug_lock_free() local 183 EVUTIL_ASSERT(lock->count == 0); in debug_lock_free() 184 EVUTIL_ASSERT(locktype == lock->locktype); in debug_lock_free() 186 _original_lock_fns.free(lock->lock, in debug_lock_free() 187 lock->locktype|EVTHREAD_LOCKTYPE_RECURSIVE); in debug_lock_free() [all …]
|
D | evthread-internal.h | 91 _evthread_lock_fns.lock(mode, lockvar); \ 124 #define EVLOCK_ASSERT_LOCKED(lock) \ argument 126 if ((lock) && _evthread_lock_debugging_enabled) { \ 127 EVUTIL_ASSERT(_evthread_is_debug_lock_held(lock)); \ 133 static inline int EVLOCK_TRY_LOCK(void *lock); 135 EVLOCK_TRY_LOCK(void *lock) in EVLOCK_TRY_LOCK() argument 137 if (lock && _evthread_lock_fns.lock) { in EVLOCK_TRY_LOCK() 138 int r = _evthread_lock_fns.lock(EVTHREAD_TRY, lock); in EVLOCK_TRY_LOCK() 169 #define EVTHREAD_COND_WAIT(cond, lock) \ argument 170 ( (cond) ? _evthread_cond_fns.wait_condition((cond), (lock), NULL) : 0 ) [all …]
|
D | evthread_win32.c | 51 CRITICAL_SECTION *lock = mm_malloc(sizeof(CRITICAL_SECTION)); in evthread_win32_lock_create() local 52 if (!lock) in evthread_win32_lock_create() 54 if (InitializeCriticalSectionAndSpinCount(lock, SPIN_COUNT) == 0) { in evthread_win32_lock_create() 55 mm_free(lock); in evthread_win32_lock_create() 58 return lock; in evthread_win32_lock_create() 64 CRITICAL_SECTION *lock = _lock; in evthread_win32_lock_free() local 65 DeleteCriticalSection(lock); in evthread_win32_lock_free() 66 mm_free(lock); in evthread_win32_lock_free() 72 CRITICAL_SECTION *lock = _lock; in evthread_win32_lock() local 74 return ! TryEnterCriticalSection(lock); in evthread_win32_lock() [all …]
|
/external/guava/guava-tests/test/com/google/common/util/concurrent/ |
D | CycleDetectingLockFactoryTest.java | 102 lockA.lock(); in testDeadlock_twoLocks() 103 lockB.lock(); in testDeadlock_twoLocks() 109 lockB.lock(); in testDeadlock_twoLocks() 111 lockA.lock(); in testDeadlock_twoLocks() 120 lockA.lock(); in testDeadlock_twoLocks() 130 lockA.lock(); in testDeadlock_twoLocks() 136 lockA.lock(); in testDeadlock_threeLocks() 137 lockB.lock(); in testDeadlock_threeLocks() 142 lockB.lock(); in testDeadlock_threeLocks() 143 lockC.lock(); in testDeadlock_threeLocks() [all …]
|
/external/guava/guava/src/com/google/common/util/concurrent/ |
D | Monitor.java | 305 this.condition = monitor.lock.newCondition(); in Guard() 325 private final ReentrantLock lock; field in Monitor 350 this.lock = new ReentrantLock(fair); in Monitor() 357 lock.lock(); in enter() 364 lock.lockInterruptibly(); in enterInterruptibly() 374 final ReentrantLock lock = this.lock; in enter() local 375 if (!fair && lock.tryLock()) { in enter() 383 return lock.tryLock(timeoutNanos, TimeUnit.NANOSECONDS); in enter() 402 return lock.tryLock(time, unit); in enterInterruptibly() 413 return lock.tryLock(); in tryEnter() [all …]
|
/external/valgrind/helgrind/ |
D | hg_lock_n_thread.c | 65 static Bool is_sane_Lock_BASE ( Lock* lock ) in is_sane_Lock_BASE() argument 67 if (lock == NULL in is_sane_Lock_BASE() 68 || (lock->magic != LockN_MAGIC && lock->magic != LockP_MAGIC)) in is_sane_Lock_BASE() 70 switch (lock->kind) { in is_sane_Lock_BASE() 74 if (lock->heldBy == NULL) { in is_sane_Lock_BASE() 75 if (lock->acquired_at != NULL) return False; in is_sane_Lock_BASE() 77 return !lock->heldW; in is_sane_Lock_BASE() 79 if (lock->acquired_at == NULL) return False; in is_sane_Lock_BASE() 84 if (VG_(isEmptyBag)(lock->heldBy)) in is_sane_Lock_BASE() 88 if (!is_sane_Bag_of_Threads(lock->heldBy)) in is_sane_Lock_BASE() [all …]
|
/external/fio/ |
D | mutex.c | 65 ret = pthread_mutex_init(&mutex->lock, &attr); in __fio_mutex_init() 112 pthread_mutex_lock(&mutex->lock); in fio_mutex_down_timeout() 121 ret = pthread_cond_timedwait(&mutex->cond, &mutex->lock, &t); in fio_mutex_down_timeout() 130 pthread_mutex_unlock(&mutex->lock); in fio_mutex_down_timeout() 142 pthread_mutex_lock(&mutex->lock); in fio_mutex_down_trylock() 147 pthread_mutex_unlock(&mutex->lock); in fio_mutex_down_trylock() 156 pthread_mutex_lock(&mutex->lock); in fio_mutex_down() 160 pthread_cond_wait(&mutex->cond, &mutex->lock); in fio_mutex_down() 165 pthread_mutex_unlock(&mutex->lock); in fio_mutex_down() 174 pthread_mutex_lock(&mutex->lock); in fio_mutex_up() [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/libchrome/base/synchronization/ |
D | lock_unittest.cc | 20 explicit BasicLockTestThread(Lock* lock) : lock_(lock), acquired_(0) {} in BasicLockTestThread() argument 53 Lock lock; in TEST() local 54 BasicLockTestThread thread(&lock); in TEST() 61 lock.Acquire(); in TEST() 63 lock.Release(); in TEST() 66 lock.Acquire(); in TEST() 69 lock.Release(); in TEST() 72 if (lock.Try()) { in TEST() 75 lock.Release(); in TEST() 79 lock.Acquire(); in TEST() [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/boringssl/src/crypto/ |
D | thread_pthread.c | 30 void CRYPTO_MUTEX_init(CRYPTO_MUTEX *lock) { in CRYPTO_MUTEX_init() argument 31 if (pthread_rwlock_init((pthread_rwlock_t *) lock, NULL) != 0) { in CRYPTO_MUTEX_init() 36 void CRYPTO_MUTEX_lock_read(CRYPTO_MUTEX *lock) { in CRYPTO_MUTEX_lock_read() argument 37 if (pthread_rwlock_rdlock((pthread_rwlock_t *) lock) != 0) { in CRYPTO_MUTEX_lock_read() 42 void CRYPTO_MUTEX_lock_write(CRYPTO_MUTEX *lock) { in CRYPTO_MUTEX_lock_write() argument 43 if (pthread_rwlock_wrlock((pthread_rwlock_t *) lock) != 0) { in CRYPTO_MUTEX_lock_write() 48 void CRYPTO_MUTEX_unlock_read(CRYPTO_MUTEX *lock) { in CRYPTO_MUTEX_unlock_read() argument 49 if (pthread_rwlock_unlock((pthread_rwlock_t *) lock) != 0) { in CRYPTO_MUTEX_unlock_read() 54 void CRYPTO_MUTEX_unlock_write(CRYPTO_MUTEX *lock) { in CRYPTO_MUTEX_unlock_write() argument 55 if (pthread_rwlock_unlock((pthread_rwlock_t *) lock) != 0) { in CRYPTO_MUTEX_unlock_write() [all …]
|
D | thread_win.c | 45 void CRYPTO_MUTEX_init(CRYPTO_MUTEX *lock) { in CRYPTO_MUTEX_init() argument 46 InitializeSRWLock((SRWLOCK *) lock); in CRYPTO_MUTEX_init() 49 void CRYPTO_MUTEX_lock_read(CRYPTO_MUTEX *lock) { in CRYPTO_MUTEX_lock_read() argument 50 AcquireSRWLockShared((SRWLOCK *) lock); in CRYPTO_MUTEX_lock_read() 53 void CRYPTO_MUTEX_lock_write(CRYPTO_MUTEX *lock) { in CRYPTO_MUTEX_lock_write() argument 54 AcquireSRWLockExclusive((SRWLOCK *) lock); in CRYPTO_MUTEX_lock_write() 57 void CRYPTO_MUTEX_unlock_read(CRYPTO_MUTEX *lock) { in CRYPTO_MUTEX_unlock_read() argument 58 ReleaseSRWLockShared((SRWLOCK *) lock); in CRYPTO_MUTEX_unlock_read() 61 void CRYPTO_MUTEX_unlock_write(CRYPTO_MUTEX *lock) { in CRYPTO_MUTEX_unlock_write() argument 62 ReleaseSRWLockExclusive((SRWLOCK *) lock); in CRYPTO_MUTEX_unlock_write() [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 …]
|
D | atomic16.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 …]
|
D | atomic64.ll | 10 ; X64: lock 13 ; X64: lock 16 ; X64: lock 19 ; X64: lock 29 ; X64: lock 32 ; X64: lock 35 ; X64: lock 38 ; X64: lock 48 ; X64: lock 52 ; X64: lock [all …]
|
/external/robolectric/v1/src/test/java/com/xtremelabs/robolectric/shadows/ |
D | PowerManagerTest.java | 42 PowerManager.WakeLock lock = powerManager.newWakeLock(0, "TAG"); in shouldAcquireAndReleaseReferenceCountedLock() local 43 assertFalse(lock.isHeld()); in shouldAcquireAndReleaseReferenceCountedLock() 44 lock.acquire(); in shouldAcquireAndReleaseReferenceCountedLock() 45 assertTrue(lock.isHeld()); in shouldAcquireAndReleaseReferenceCountedLock() 46 lock.acquire(); in shouldAcquireAndReleaseReferenceCountedLock() 48 assertTrue(lock.isHeld()); in shouldAcquireAndReleaseReferenceCountedLock() 49 lock.release(); in shouldAcquireAndReleaseReferenceCountedLock() 51 assertTrue(lock.isHeld()); in shouldAcquireAndReleaseReferenceCountedLock() 52 lock.release(); in shouldAcquireAndReleaseReferenceCountedLock() 53 assertFalse(lock.isHeld()); in shouldAcquireAndReleaseReferenceCountedLock() [all …]
|
/external/parameter-framework/asio-1.10.6/include/asio/detail/ |
D | posix_event.hpp | 43 void signal(Lock& lock) in signal() argument 45 this->signal_all(lock); in signal() 50 void signal_all(Lock& lock) in signal_all() argument 52 ASIO_ASSERT(lock.locked()); in signal_all() 53 (void)lock; in signal_all() 60 void unlock_and_signal_one(Lock& lock) in unlock_and_signal_one() argument 62 ASIO_ASSERT(lock.locked()); in unlock_and_signal_one() 65 lock.unlock(); in unlock_and_signal_one() 72 bool maybe_unlock_and_signal_one(Lock& lock) in maybe_unlock_and_signal_one() argument 74 ASIO_ASSERT(lock.locked()); in maybe_unlock_and_signal_one() [all …]
|
/external/libchrome/base/task_scheduler/ |
D | scheduler_lock_unittest.cc | 26 explicit BasicLockTestThread(SchedulerLock* lock) in BasicLockTestThread() argument 28 lock_(lock), in BasicLockTestThread() 56 explicit BasicLockAcquireAndWaitThread(SchedulerLock* lock) in BasicLockAcquireAndWaitThread() argument 58 lock_(lock), in BasicLockAcquireAndWaitThread() 89 SchedulerLock lock; in TEST() local 90 BasicLockTestThread thread(&lock); in TEST() 96 lock.Acquire(); in TEST() 98 lock.Release(); in TEST() 101 lock.Acquire(); in TEST() 104 lock.Release(); in TEST() [all …]
|
D | scheduler_lock_impl.cc | 27 const SchedulerLockImpl* const lock, in RegisterLock() argument 29 DCHECK_NE(lock, predecessor) << "Reentrant locks are unsupported."; in RegisterLock() 31 allowed_predecessor_map_[lock] = predecessor; in RegisterLock() 32 AssertSafePredecessor(lock); in RegisterLock() 35 void UnregisterLock(const SchedulerLockImpl* const lock) { in UnregisterLock() argument 37 allowed_predecessor_map_.erase(lock); in UnregisterLock() 40 void RecordAcquisition(const SchedulerLockImpl* const lock) { in RecordAcquisition() argument 41 AssertSafeAcquire(lock); in RecordAcquisition() 42 GetAcquiredLocksOnCurrentThread()->push_back(lock); in RecordAcquisition() 45 void RecordRelease(const SchedulerLockImpl* const lock) { in RecordRelease() argument [all …]
|
/external/ltp/testcases/network/nfs/nfslock01/ |
D | nfs_flock_func.c | 8 struct flock lock; in lock_reg() local 10 lock.l_type = type; in lock_reg() 11 lock.l_start = offset; in lock_reg() 12 lock.l_whence = whence; in lock_reg() 13 lock.l_len = len; in lock_reg() 15 return (fcntl(fd, cmd, &lock)); in lock_reg() 20 struct flock lock; in lock_test() local 22 lock.l_type = type; in lock_test() 23 lock.l_start = offset; in lock_test() 24 lock.l_whence = whence; in lock_test() [all …]
|
/external/parameter-framework/asio-1.10.6/include/asio/detail/impl/ |
D | task_io_service.ipp | 43 lock_->lock(); 72 lock_->lock(); 98 mutex::scoped_lock lock(mutex_); 100 lock.unlock(); 117 mutex::scoped_lock lock(mutex_); 122 wake_one_thread_and_unlock(lock); 139 mutex::scoped_lock lock(mutex_); 142 for (; do_run_one(lock, this_thread, ec); lock.lock()) 161 mutex::scoped_lock lock(mutex_); 163 return do_run_one(lock, this_thread, ec); [all …]
|
/external/curl/tests/data/ |
D | test506 | 84 lock: share [Pigs in space]: 0 87 lock: cookie [Pigs in space]: 2 90 lock: cookie [Pigs in space]: 4 93 lock: cookie [Pigs in space]: 6 96 lock: cookie [Pigs in space]: 8 99 lock: cookie [Pigs in space]: 10 102 lock: cookie [Pigs in space]: 12 104 lock: share [Pigs in space]: 14 108 lock: share [Pigs in space]: 16 111 lock: dns [Pigs in space]: 18 [all …]
|
/external/jemalloc/test/src/ |
D | mtx.c | 12 if (!InitializeCriticalSectionAndSpinCount(&mtx->lock, _CRT_SPINCOUNT)) in mtx_init() 15 mtx->lock = OS_UNFAIR_LOCK_INIT; in mtx_init() 17 mtx->lock = 0; in mtx_init() 24 if (pthread_mutex_init(&mtx->lock, &attr) != 0) { in mtx_init() 41 pthread_mutex_destroy(&mtx->lock); in mtx_fini() 50 EnterCriticalSection(&mtx->lock); in mtx_lock() 52 os_unfair_lock_lock(&mtx->lock); in mtx_lock() 54 OSSpinLockLock(&mtx->lock); in mtx_lock() 56 pthread_mutex_lock(&mtx->lock); in mtx_lock() 65 LeaveCriticalSection(&mtx->lock); in mtx_unlock() [all …]
|
/external/elfutils/lib/ |
D | eu-config.h | 38 # define rwlock_init(lock) RWLOCK_CALL (init (&lock, NULL)) argument 39 # define rwlock_fini(lock) RWLOCK_CALL (destroy (&lock)) argument 40 # define rwlock_rdlock(lock) RWLOCK_CALL (rdlock (&lock)) argument 41 # define rwlock_wrlock(lock) RWLOCK_CALL (wrlock (&lock)) argument 42 # define rwlock_unlock(lock) RWLOCK_CALL (unlock (&lock)) argument 48 # define rwlock_init(lock) ((void) (lock)) argument 49 # define rwlock_fini(lock) ((void) (lock)) argument 50 # define rwlock_rdlock(lock) ((void) (lock)) argument 51 # define rwlock_wrlock(lock) ((void) (lock)) argument 52 # define rwlock_unlock(lock) ((void) (lock)) argument
|