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.cpp173 static int __pthread_cond_timedwait(pthread_cond_internal_t* cond, pthread_mutex_t* mutex, in __pthread_cond_timedwait() argument
181 pthread_mutex_unlock(mutex); in __pthread_cond_timedwait()
184 pthread_mutex_lock(mutex); in __pthread_cond_timedwait()
200 int pthread_cond_wait(pthread_cond_t* cond_interface, pthread_mutex_t* mutex) { in pthread_cond_wait() argument
202 return __pthread_cond_timedwait(cond, mutex, false, nullptr); in pthread_cond_wait()
205 int pthread_cond_timedwait(pthread_cond_t *cond_interface, pthread_mutex_t * mutex, in pthread_cond_timedwait() argument
209 return __pthread_cond_timedwait(cond, mutex, cond->use_realtime_clock(), abstime); in pthread_cond_timedwait()
213 pthread_mutex_t* mutex, in pthread_cond_timedwait_monotonic_np() argument
215 return __pthread_cond_timedwait(__get_internal_cond(cond_interface), mutex, false, abs_timeout); in pthread_cond_timedwait_monotonic_np()
218 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.cpp46 std::mutex mutex; member
47 std::vector<unwindstack::LocalFrameData> backtrace GUARDED_BY(mutex);
101 std::lock_guard<std::mutex> lock(entry->mutex); in fd_hook()
107 std::lock_guard<std::mutex> lock(entry->mutex); in fd_hook()
124 if (!entry->mutex.try_lock()) { in fdtrack_iterate()
130 entry->mutex.unlock(); in fdtrack_iterate()
136 entry->mutex.unlock(); in fdtrack_iterate()
149 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_;
DMapData.cpp180 std::lock_guard<std::mutex> lock(m_); in find()
DRecordData.cpp122 std::lock_guard<std::mutex> lock(dump_lock_); in Dump()
Dmalloc_debug.cpp960 static std::mutex g_dump_lock;
988 std::lock_guard<std::mutex> guard(g_dump_lock); in debug_write_malloc_leak_info()
1004 std::lock_guard<std::mutex> guard(g_dump_lock); in debug_dump_heap()
/bionic/tests/
Dpthread_test.cpp317 pthread_mutex_t mutex; member
322 ASSERT_EQ(0, pthread_mutex_init(&data.mutex, nullptr)); in main()
323 ASSERT_EQ(0, pthread_mutex_lock(&data.mutex)); in main()
329 ASSERT_EQ(0, pthread_mutex_lock(&data.mutex)); in main()
330 ASSERT_EQ(0, pthread_mutex_unlock(&data.mutex)); in main()
344 pthread_mutex_unlock(&data->mutex); in thread_fn()
1471 pthread_mutex_t mutex; member in pthread_CondWakeupTest
1482 std::function<int (pthread_cond_t* cond, pthread_mutex_t* mutex)> wait_function;
1486 ASSERT_EQ(0, pthread_mutex_init(&mutex, nullptr)); in SetUp()
1498 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.cpp175 static std::mutex cc1_init_mutex; in generateTargetCC1Flags()
176 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