Home
last modified time | relevance | path

Searched refs:mutex (Results 1 – 23 of 23) 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()
80 pthread_mutex_t mutex = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP; in BM_pthread_mutex_lock_ERRORCHECK() local
83 pthread_mutex_lock(&mutex); in BM_pthread_mutex_lock_ERRORCHECK()
84 pthread_mutex_unlock(&mutex); in BM_pthread_mutex_lock_ERRORCHECK()
92 pthread_mutex_t mutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP; in BM_pthread_mutex_lock_RECURSIVE() local
95 pthread_mutex_lock(&mutex); in BM_pthread_mutex_lock_RECURSIVE()
96 pthread_mutex_unlock(&mutex); in BM_pthread_mutex_lock_RECURSIVE()
104 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.cpp54 std::mutex mutex; member
55 std::vector<unwindstack::FrameData> backtrace GUARDED_BY(mutex);
133 std::lock_guard<std::mutex> lock(entry->mutex); in fd_hook()
144 std::lock_guard<std::mutex> lock(entry->mutex); in fd_hook()
161 if (!entry->mutex.try_lock()) { in fdtrack_iterate()
167 entry->mutex.unlock(); in fdtrack_iterate()
173 entry->mutex.unlock(); in fdtrack_iterate()
185 entry->mutex.unlock(); in fdtrack_iterate()
/bionic/libc/malloc_debug/
DPointerData.cpp61 std::mutex PointerData::pointer_mutex_;
65 std::mutex PointerData::frame_mutex_;
74 std::mutex PointerData::free_pointer_mutex_;
171 std::lock_guard<std::mutex> frame_guard(frame_mutex_); in AddBacktrace()
195 std::lock_guard<std::mutex> frame_guard(frame_mutex_); in RemoveBacktrace()
218 std::lock_guard<std::mutex> pointer_guard(pointer_mutex_); in Add()
227 std::lock_guard<std::mutex> pointer_guard(pointer_mutex_); in Remove()
245 std::lock_guard<std::mutex> pointer_guard(pointer_mutex_); in GetFrames()
258 std::lock_guard<std::mutex> frame_guard(frame_mutex_); in GetFrames()
273 std::lock_guard<std::mutex> frame_guard(frame_mutex_); in LogBacktrace()
[all …]
DPointerData.h183 static std::mutex pointer_mutex_;
186 static std::mutex frame_mutex_;
192 static std::mutex free_pointer_mutex_;
DRecordData.cpp135 std::lock_guard<std::mutex> entries_lock(entries_lock_); in WriteEntries()
192 std::lock_guard<std::mutex> entries_lock(entries_lock_); in AddEntryOnly()
DMapData.h71 std::mutex m_;
DRecordData.h173 std::mutex entries_lock_;
DMapData.cpp183 std::lock_guard<std::mutex> lock(m_); in find()
Dmalloc_debug.cpp1105 static std::mutex g_dump_lock;
1137 std::lock_guard<std::mutex> guard(g_dump_lock); in debug_write_malloc_leak_info()
1153 std::lock_guard<std::mutex> guard(g_dump_lock); in debug_dump_heap()
/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.cpp345 pthread_mutex_t mutex; member
350 ASSERT_EQ(0, pthread_mutex_init(&data.mutex, nullptr)); in main()
351 ASSERT_EQ(0, pthread_mutex_lock(&data.mutex)); in main()
357 ASSERT_EQ(0, pthread_mutex_lock(&data.mutex)); in main()
358 ASSERT_EQ(0, pthread_mutex_unlock(&data.mutex)); in main()
372 pthread_mutex_unlock(&data->mutex); in thread_fn()
1510 pthread_mutex_t mutex; member in pthread_CondWakeupTest
1522 std::function<int (pthread_cond_t* cond, pthread_mutex_t* mutex)> wait_function;
1526 ASSERT_EQ(0, pthread_mutex_init(&mutex, nullptr)); in SetUp()
1538 std::function<int(pthread_cond_t* cond, pthread_mutex_t* mutex)> wait_function) { in StartWaitingThread()
[all …]
Ddlfcn_test.cpp1416 std::mutex mtx; in TEST()
1429 std::unique_lock<std::mutex> lock(mtx); in TEST()
1457 std::unique_lock<std::mutex> lock(mtx); in TEST()
1497 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.cpp340 std::unique_lock<std::mutex> lock(this->mutex); in parseAST()
/bionic/libc/malloc_debug/tests/
Dmalloc_debug_system_tests.cpp158 std::lock_guard<std::mutex> guard(data_lock_); in LogReader()
189 std::lock_guard<std::mutex> guard(data_lock_); in GetLog()
196 std::mutex data_lock_;
/bionic/docs/
Dstatus.md131 * `pthread_mutexattr_getprotocol`/`pthread_mutexattr_setprotocol` (mutex priority inheritance)
374 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