Home
last modified time | relevance | path

Searched refs:mutex (Results 1 – 21 of 21) sorted by relevance

/bionic/libc/bionic/
Dpthread_mutex.cpp148 static inline __always_inline int PIMutexTryLock(PIMutex& mutex) { in PIMutexTryLock() argument
152 if (__predict_true(atomic_compare_exchange_strong_explicit(&mutex.owner_tid, in PIMutexTryLock()
160 if (mutex.type == PTHREAD_MUTEX_NORMAL) { in PIMutexTryLock()
163 if (mutex.type == PTHREAD_MUTEX_ERRORCHECK) { in PIMutexTryLock()
166 if (mutex.counter == 0xffff) { in PIMutexTryLock()
169 mutex.counter++; in PIMutexTryLock()
177 static int __attribute__((noinline)) PIMutexTimedLock(PIMutex& mutex, in PIMutexTimedLock() argument
180 int ret = PIMutexTryLock(mutex); in PIMutexTimedLock()
186 ret = -__futex_pi_lock_ex(&mutex.owner_tid, mutex.shared, use_realtime_clock, abs_timeout); in PIMutexTimedLock()
191 static int PIMutexUnlock(PIMutex& mutex) { in PIMutexUnlock() argument
[all …]
Dpthread_cond.cpp184 static int __pthread_cond_timedwait(pthread_cond_internal_t* cond, pthread_mutex_t* mutex, in __pthread_cond_timedwait() argument
197 pthread_mutex_unlock(mutex); in __pthread_cond_timedwait()
205 pthread_mutex_lock(mutex); in __pthread_cond_timedwait()
221 int pthread_cond_wait(pthread_cond_t* cond_interface, pthread_mutex_t* mutex) { in pthread_cond_wait() argument
223 return __pthread_cond_timedwait(cond, mutex, false, nullptr); in pthread_cond_wait()
226 int pthread_cond_timedwait(pthread_cond_t *cond_interface, pthread_mutex_t * mutex, in pthread_cond_timedwait() argument
230 return __pthread_cond_timedwait(cond, mutex, cond->use_realtime_clock(), abstime); in pthread_cond_timedwait()
234 pthread_mutex_t* mutex, in pthread_cond_timedwait_monotonic_np() argument
236 return __pthread_cond_timedwait(__get_internal_cond(cond_interface), mutex, false, abs_timeout); in pthread_cond_timedwait_monotonic_np()
239 int pthread_cond_clockwait(pthread_cond_t* cond_interface, pthread_mutex_t* mutex, clockid_t clock, in pthread_cond_clockwait() argument
[all …]
/bionic/benchmarks/
Dpthread_benchmark.cpp69 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; in BM_pthread_mutex_lock() local
72 pthread_mutex_lock(&mutex); in BM_pthread_mutex_lock()
73 pthread_mutex_unlock(&mutex); in BM_pthread_mutex_lock()
79 pthread_mutex_t mutex = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP; in BM_pthread_mutex_lock_ERRORCHECK() local
82 pthread_mutex_lock(&mutex); in BM_pthread_mutex_lock_ERRORCHECK()
83 pthread_mutex_unlock(&mutex); in BM_pthread_mutex_lock_ERRORCHECK()
89 pthread_mutex_t mutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP; in BM_pthread_mutex_lock_RECURSIVE() local
92 pthread_mutex_lock(&mutex); in BM_pthread_mutex_lock_RECURSIVE()
93 pthread_mutex_unlock(&mutex); in BM_pthread_mutex_lock_RECURSIVE()
100 pthread_mutex_t mutex; member
[all …]
Datomic_benchmark.cpp46 static std::mutex mtx;
144 std::lock_guard<std::mutex> _(mtx); in BM_atomic_fetch_add_cs()
Dutil.h29 extern std::mutex g_map_lock;
Dbionic_benchmarks.cpp88 std::mutex g_map_lock;
/bionic/libfdtrack/
Dfdtrack.cpp49 std::mutex mutex; member
50 std::vector<unwindstack::LocalFrameData> backtrace GUARDED_BY(mutex);
117 std::lock_guard<std::mutex> lock(entry->mutex); in fd_hook()
123 std::lock_guard<std::mutex> lock(entry->mutex); in fd_hook()
140 if (!entry->mutex.try_lock()) { in fdtrack_iterate()
146 entry->mutex.unlock(); in fdtrack_iterate()
152 entry->mutex.unlock(); in fdtrack_iterate()
165 entry->mutex.unlock(); in fdtrack_iterate()
/bionic/libc/malloc_debug/
DPointerData.cpp61 std::mutex PointerData::pointer_mutex_;
65 std::mutex PointerData::frame_mutex_;
73 std::mutex PointerData::free_pointer_mutex_;
154 std::lock_guard<std::mutex> frame_guard(frame_mutex_); in AddBacktrace()
179 std::lock_guard<std::mutex> frame_guard(frame_mutex_); in RemoveBacktrace()
203 std::lock_guard<std::mutex> pointer_guard(pointer_mutex_); in Add()
211 std::lock_guard<std::mutex> pointer_guard(pointer_mutex_); in Remove()
229 std::lock_guard<std::mutex> pointer_guard(pointer_mutex_); in GetFrames()
241 std::lock_guard<std::mutex> frame_guard(frame_mutex_); in GetFrames()
256 std::lock_guard<std::mutex> frame_guard(frame_mutex_); in LogBacktrace()
[all …]
DPointerData.h178 static std::mutex pointer_mutex_;
181 static std::mutex frame_mutex_;
187 static std::mutex free_pointer_mutex_;
DMapData.h71 std::mutex m_;
DRecordData.h165 std::mutex dump_lock_;
DRecordData.cpp122 std::lock_guard<std::mutex> lock(dump_lock_); in Dump()
DMapData.cpp183 std::lock_guard<std::mutex> lock(m_); in find()
/bionic/libc/dns/resolv/
Dres_data.cpp30 pthread_mutex_lock(&mutex); in GlobalStateAccessor()
38 pthread_mutex_unlock(&mutex); in ~GlobalStateAccessor()
50 static pthread_mutex_t mutex; member in GlobalStateAccessor
54 pthread_mutex_t GlobalStateAccessor::mutex = PTHREAD_MUTEX_INITIALIZER; member in GlobalStateAccessor
/bionic/tests/
Dpthread_test.cpp319 pthread_mutex_t mutex; member
324 ASSERT_EQ(0, pthread_mutex_init(&data.mutex, nullptr)); in main()
325 ASSERT_EQ(0, pthread_mutex_lock(&data.mutex)); in main()
331 ASSERT_EQ(0, pthread_mutex_lock(&data.mutex)); in main()
332 ASSERT_EQ(0, pthread_mutex_unlock(&data.mutex)); in main()
346 pthread_mutex_unlock(&data->mutex); in thread_fn()
1470 pthread_mutex_t mutex; member in pthread_CondWakeupTest
1481 std::function<int (pthread_cond_t* cond, pthread_mutex_t* mutex)> wait_function;
1485 ASSERT_EQ(0, pthread_mutex_init(&mutex, nullptr)); in SetUp()
1497 std::function<int(pthread_cond_t* cond, pthread_mutex_t* mutex)> wait_function) { in StartWaitingThread()
[all …]
Ddlfcn_test.cpp1420 std::mutex mtx; in TEST()
1433 std::unique_lock<std::mutex> lock(mtx); in TEST()
1461 std::unique_lock<std::mutex> lock(mtx); in TEST()
1501 std::unique_lock<std::mutex> lock(mtx); in TEST()
/bionic/tools/versioner/src/
DDeclarationDatabase.h199 std::mutex mutex; variable
DDriver.cpp176 static std::mutex cc1_init_mutex; in generateTargetCC1Flags()
177 std::unique_lock<std::mutex> lock(cc1_init_mutex); in generateTargetCC1Flags()
DDeclarationDatabase.cpp339 std::unique_lock<std::mutex> lock(this->mutex); in parseAST()
/bionic/docs/
Dstatus.md96 * `pthread_mutexattr_getprotocol`/`pthread_mutexattr_setprotocol` (mutex priority inheritance)
339 for example, calling a `pthread_mutex_` function on a destroyed mutex,
Delf-tls.md509 [elf_tls.cpp][tls_modules-libc]). `__tls_get_addr` in libc.so acquires the `TlsModules::mutex` and