Home
last modified time | relevance | path

Searched refs:lock (Results 1 – 25 of 1264) sorted by relevance

12345678910>>...51

/external/bison/lib/glthread/
Dlock.c38 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/
Devthread.c91 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 …]
Devthread-internal.h91 _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 …]
Devthread_win32.c51 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 …]
Devthread_pthread.c46 pthread_mutex_t *lock = mm_malloc(sizeof(pthread_mutex_t)); in evthread_posix_lock_alloc() local
47 if (!lock) in evthread_posix_lock_alloc()
51 if (pthread_mutex_init(lock, attr)) { in evthread_posix_lock_alloc()
52 mm_free(lock); in evthread_posix_lock_alloc()
55 return lock; in evthread_posix_lock_alloc()
61 pthread_mutex_t *lock = _lock; in evthread_posix_lock_free() local
62 pthread_mutex_destroy(lock); in evthread_posix_lock_free()
63 mm_free(lock); in evthread_posix_lock_free()
69 pthread_mutex_t *lock = _lock; in evthread_posix_lock() local
71 return pthread_mutex_trylock(lock); in evthread_posix_lock()
[all …]
/external/guava/guava-tests/test/com/google/common/util/concurrent/
DCycleDetectingLockFactoryTest.java102 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/compiler-rt/lib/tsan/rtl/
Dtsan_interceptors_mac.cc25 TSAN_INTERCEPTOR(void, OSSpinLockLock, volatile OSSpinLock *lock) { in TSAN_INTERCEPTOR() argument
28 return REAL(OSSpinLockLock)(lock); in TSAN_INTERCEPTOR()
30 SCOPED_TSAN_INTERCEPTOR(OSSpinLockLock, lock); in TSAN_INTERCEPTOR()
31 REAL(OSSpinLockLock)(lock); in TSAN_INTERCEPTOR()
32 Acquire(thr, pc, (uptr)lock); in TSAN_INTERCEPTOR()
35 TSAN_INTERCEPTOR(bool, OSSpinLockTry, volatile OSSpinLock *lock) { in TSAN_INTERCEPTOR() argument
38 return REAL(OSSpinLockTry)(lock); in TSAN_INTERCEPTOR()
40 SCOPED_TSAN_INTERCEPTOR(OSSpinLockTry, lock); in TSAN_INTERCEPTOR()
41 bool result = REAL(OSSpinLockTry)(lock); in TSAN_INTERCEPTOR()
43 Acquire(thr, pc, (uptr)lock); in TSAN_INTERCEPTOR()
[all …]
/external/guava/guava/src/com/google/common/util/concurrent/
DMonitor.java305 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/
Dhg_lock_n_thread.c65 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/
Dmutex.c65 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/libchrome/base/synchronization/
Dlock_unittest.cc20 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/sfntly/cpp/src/test/
Dlock_test.cc29 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/androidplot/AndroidPlot-Core/src/main/java/com/androidplot/xy/
DSimpleXYSeries.java40 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/llvm/test/CodeGen/X86/
Datomic8.ll12 ; 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 …]
Datomic16.ll12 ; 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 …]
Datomic64.ll10 ; 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/
DPowerManagerTest.java42 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/
Dposix_event.hpp43 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/boringssl/src/crypto/
Dthread_win.c91 void CRYPTO_MUTEX_init(CRYPTO_MUTEX *lock) { in CRYPTO_MUTEX_init() argument
92 if (!InitializeCriticalSectionAndSpinCount((CRITICAL_SECTION *) lock, 0x400)) { in CRYPTO_MUTEX_init()
97 void CRYPTO_MUTEX_lock_read(CRYPTO_MUTEX *lock) { in CRYPTO_MUTEX_lock_read() argument
99 EnterCriticalSection((CRITICAL_SECTION *) lock); in CRYPTO_MUTEX_lock_read()
102 void CRYPTO_MUTEX_lock_write(CRYPTO_MUTEX *lock) { in CRYPTO_MUTEX_lock_write() argument
103 EnterCriticalSection((CRITICAL_SECTION *) lock); in CRYPTO_MUTEX_lock_write()
106 void CRYPTO_MUTEX_unlock(CRYPTO_MUTEX *lock) { in CRYPTO_MUTEX_unlock() argument
107 LeaveCriticalSection((CRITICAL_SECTION *) lock); in CRYPTO_MUTEX_unlock()
110 void CRYPTO_MUTEX_cleanup(CRYPTO_MUTEX *lock) { in CRYPTO_MUTEX_cleanup() argument
111 DeleteCriticalSection((CRITICAL_SECTION *) lock); in CRYPTO_MUTEX_cleanup()
[all …]
Dthread_pthread.c31 void CRYPTO_MUTEX_init(CRYPTO_MUTEX *lock) { in CRYPTO_MUTEX_init() argument
32 if (pthread_rwlock_init((pthread_rwlock_t *) lock, NULL) != 0) { in CRYPTO_MUTEX_init()
37 void CRYPTO_MUTEX_lock_read(CRYPTO_MUTEX *lock) { in CRYPTO_MUTEX_lock_read() argument
38 if (pthread_rwlock_rdlock((pthread_rwlock_t *) lock) != 0) { in CRYPTO_MUTEX_lock_read()
43 void CRYPTO_MUTEX_lock_write(CRYPTO_MUTEX *lock) { in CRYPTO_MUTEX_lock_write() argument
44 if (pthread_rwlock_wrlock((pthread_rwlock_t *) lock) != 0) { in CRYPTO_MUTEX_lock_write()
49 void CRYPTO_MUTEX_unlock(CRYPTO_MUTEX *lock) { in CRYPTO_MUTEX_unlock() argument
50 if (pthread_rwlock_unlock((pthread_rwlock_t *) lock) != 0) { in CRYPTO_MUTEX_unlock()
55 void CRYPTO_MUTEX_cleanup(CRYPTO_MUTEX *lock) { in CRYPTO_MUTEX_cleanup() argument
56 pthread_rwlock_destroy((pthread_rwlock_t *) lock); in CRYPTO_MUTEX_cleanup()
[all …]
/external/parameter-framework/asio-1.10.6/include/asio/detail/impl/
Dtask_io_service.ipp43 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/
Dtest50684 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/elfutils/lib/
Deu-config.h38 # 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
/external/libcxx/test/std/thread/thread.mutex/thread.lock.algorithm/
Dlock.pass.cpp27 void lock() in lock() function in L0
50 void lock() in lock() function in L1
73 void lock() in lock() function in L2
94 std::lock(l0, l1); in main()
101 std::lock(l0, l1); in main()
108 std::lock(l0, l1); in main()
117 std::lock(l0, l1); in main()
131 std::lock(l0, l1); in main()
145 std::lock(l0, l1); in main()
159 std::lock(l0, l1); in main()
[all …]
/external/deqp/framework/qphelper/
DqpTestLog.c127 deMutex lock; /*!< Lock for mutable state below. */ member
354 log->lock = deMutex_create(DE_NULL); in qpTestLog_createFileLog()
365 if (!log->lock) in qpTestLog_createFileLog()
394 if (log->lock) in qpTestLog_destroy()
395 deMutex_destroy(log->lock); in qpTestLog_destroy()
414 deMutex_lock(log->lock); in qpTestLog_startCase()
436 deMutex_unlock(log->lock); in qpTestLog_startCase()
440 deMutex_unlock(log->lock); in qpTestLog_startCase()
458 deMutex_lock(log->lock); in qpTestLog_endCase()
470 deMutex_unlock(log->lock); in qpTestLog_endCase()
[all …]

12345678910>>...51