Home
last modified time | relevance | path

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

12345678

/system/chre/util/tests/
Dconditional_lock_guard_test.cc44 MockMutex mutex; in TEST() local
45 ASSERT_EQ(mutex.getLockCount(), 0); in TEST()
48 ConditionalLockGuard<MockMutex> lock(mutex, true); in TEST()
49 EXPECT_EQ(mutex.getLockCount(), 1); in TEST()
52 EXPECT_EQ(mutex.getLockCount(), 0); in TEST()
56 MockMutex mutex; in TEST() local
57 ASSERT_EQ(mutex.getLockCount(), 0); in TEST()
60 ConditionalLockGuard<MockMutex> lock(mutex, false); in TEST()
61 EXPECT_EQ(mutex.getLockCount(), 0); in TEST()
64 EXPECT_EQ(mutex.getLockCount(), 0); in TEST()
Dlock_guard_test.cc44 MockMutex mutex; in TEST() local
45 EXPECT_EQ(mutex.getLockCount(), 0); in TEST()
48 LockGuard<MockMutex> lock(mutex); in TEST()
49 EXPECT_EQ(mutex.getLockCount(), 1); in TEST()
52 EXPECT_EQ(mutex.getLockCount(), 0); in TEST()
/system/bt/osi/src/
Dfixed_queue.cc35 std::mutex* mutex; member
49 ret->mutex = new std::mutex; in fixed_queue_new()
81 delete queue->mutex; in fixed_queue_free()
99 std::lock_guard<std::mutex> lock(*queue->mutex); in fixed_queue_is_empty()
106 std::lock_guard<std::mutex> lock(*queue->mutex); in fixed_queue_length()
123 std::lock_guard<std::mutex> lock(*queue->mutex); in fixed_queue_enqueue()
137 std::lock_guard<std::mutex> lock(*queue->mutex); in fixed_queue_dequeue()
154 std::lock_guard<std::mutex> lock(*queue->mutex); in fixed_queue_try_enqueue()
169 std::lock_guard<std::mutex> lock(*queue->mutex); in fixed_queue_try_dequeue()
182 std::lock_guard<std::mutex> lock(*queue->mutex); in fixed_queue_try_peek_first()
[all …]
Dreactor.cc45 std::mutex* list_mutex;
56 std::mutex* mutex; // protects the lifetime of this object and all variables. member
89 ret->list_mutex = new std::mutex; in reactor_new()
153 object->mutex = new std::mutex; in reactor_register()
164 delete object->mutex; in reactor_register()
190 std::lock_guard<std::mutex> lock(*object->mutex); in reactor_change_registration()
213 std::unique_lock<std::mutex> lock(*reactor->list_mutex); in reactor_unregister()
225 obj->mutex->lock(); in reactor_unregister()
226 obj->mutex->unlock(); in reactor_unregister()
227 delete obj->mutex; in reactor_unregister()
[all …]
Dallocation_tracker.cc43 static std::mutex tracker_lock;
53 std::unique_lock<std::mutex> lock(tracker_lock); in allocation_tracker_init()
66 std::unique_lock<std::mutex> lock(tracker_lock); in allocation_tracker_uninit()
74 std::unique_lock<std::mutex> lock(tracker_lock); in allocation_tracker_reset()
81 std::unique_lock<std::mutex> lock(tracker_lock); in allocation_tracker_expect_no_allocations()
104 std::unique_lock<std::mutex> lock(tracker_lock); in allocation_tracker_notify_alloc()
138 std::unique_lock<std::mutex> lock(tracker_lock); in allocation_tracker_notify_free()
180 std::unique_lock<std::mutex> lock(tracker_lock); in osi_allocator_debug_dump()
/system/bt/service/common/bluetooth/util/
Datomic_string.cc24 std::mutex* mutex = const_cast<std::mutex*>(&lock_); in Get() local
25 std::lock_guard<std::mutex> lock(*mutex); in Get()
30 std::lock_guard<std::mutex> lock(lock_); in Set()
/system/core/adb/
Dadb_utils.h62 std::mutex mutex; variable
69 std::unique_lock<std::mutex> lock(mutex); in Push()
80 std::unique_lock<std::mutex> lock(mutex); in PopAll()
/system/extras/perfprofd/
Dperfprofd_threaded_handler.h53 std::unique_lock<std::mutex> guard(mutex_); in Sleep()
58 std::unique_lock<std::mutex> guard(mutex_); in ShouldStopProfiling()
63 std::unique_lock<std::mutex> guard(mutex_); in ResetStopProfiling()
67 std::unique_lock<std::mutex> guard(mutex_); in StopProfiling()
87 std::mutex mutex_;
104 std::lock_guard<std::mutex> guard(lock_); in StartProfiling()
120 std::lock_guard<std::mutex> unset_guard(service->lock_); in StartProfiling()
130 std::lock_guard<std::mutex> guard(lock_); in StopProfiling()
182 std::mutex lock_;
/system/chre/platform/linux/include/chre/target_platform/
Dcondition_variable_impl.h30 inline void ConditionVariable::wait(Mutex& mutex) { in wait() argument
31 mConditionVariable.wait(mutex); in wait()
34 inline bool ConditionVariable::wait_for(Mutex& mutex, Nanoseconds timeout) { in wait_for() argument
36 mutex, std::chrono::nanoseconds(timeout.toRawNanoseconds())); in wait_for()
/system/libhidl/base/
DSynchronizedQueue.h48 std::unique_lock<std::mutex> lock() { in lock()
49 return std::unique_lock<std::mutex>(mMutex); in lock()
61 std::mutex mMutex;
73 std::unique_lock<std::mutex> lock(mMutex); in wait_pop()
89 std::unique_lock<std::mutex> lock(mMutex); in push()
104 std::unique_lock<std::mutex> lock(mMutex); in size()
/system/bt/service/
Dadapter.cc37 using std::mutex;
94 lock_guard<mutex> lock(observers_lock_); in AddObserver()
99 lock_guard<mutex> lock(observers_lock_); in RemoveObserver()
187 lock_guard<mutex> lock(local_le_features_lock_); in IsMultiAdvertisementSupported()
192 lock_guard<mutex> lock(connected_devices_lock_); in IsDeviceConnected()
197 lock_guard<mutex> lock(local_le_features_lock_); in GetTotalNumberOfTrackableAdvertisements()
202 lock_guard<mutex> lock(local_le_features_lock_); in IsOffloadedFilteringSupported()
207 lock_guard<mutex> lock(local_le_features_lock_); in IsOffloadedScanBatchingSupported()
281 lock_guard<mutex> lock(local_le_features_lock_); in AdapterPropertiesCallback()
325 lock_guard<mutex> lock(connected_devices_lock_); in AclStateChangedCallback()
[all …]
Dlow_energy_client.cc27 using std::mutex;
78 lock_guard<mutex> lock(connection_fields_lock_); in Disconnect()
105 lock_guard<mutex> lock(connection_fields_lock_); in SetMtu()
125 lock_guard<mutex> lock(delegate_mutex_); in SetDelegate()
143 lock_guard<mutex> lock(connection_fields_lock_); in ConnectCallback()
162 lock_guard<mutex> lock(connection_fields_lock_); in DisconnectCallback()
180 lock_guard<mutex> lock(connection_fields_lock_); in MtuChangedCallback()
210 lock_guard<mutex> lock(pending_calls_lock_); in RegisterInstance()
234 lock_guard<mutex> lock(pending_calls_lock_); in RegisterClientCallback()
/system/core/libutils/include/utils/
DCondition.h69 status_t wait(Mutex& mutex);
71 status_t waitRelative(Mutex& mutex, nsecs_t reltime);
117 inline status_t Condition::wait(Mutex& mutex) { in wait() argument
118 return -pthread_cond_wait(&mCond, &mutex.mMutex); in wait()
120 inline status_t Condition::waitRelative(Mutex& mutex, nsecs_t reltime) { in waitRelative() argument
150 return -pthread_cond_timedwait(&mCond, &mutex.mMutex, &ts); in waitRelative()
/system/bt/osi/include/
Dleaky_bonded_queue.h84 std::mutex lock_;
102 std::lock_guard<std::mutex> lock(lock_); in Enqueue()
112 std::lock_guard<std::mutex> lock(lock_); in EnqueueWithPop()
126 std::lock_guard<std::mutex> lock(lock_); in Dequeue()
134 std::lock_guard<std::mutex> lock(lock_); in Clear()
143 std::lock_guard<std::mutex> lock(lock_); in Length()
154 std::lock_guard<std::mutex> lock(lock_); in Empty()
/system/libhidl/transport/include/hidl/
DConcurrentMap.h34 std::unique_lock<std::mutex> _lock(mMutex); in set()
40 std::unique_lock<std::mutex> _lock(mMutex); in get()
49 std::unique_lock<std::mutex> _lock(mMutex); in erase()
54 std::unique_lock<std::mutex> _lock(mMutex); in eraseIfEqual()
67 std::unique_lock<std::mutex> lock() { return std::unique_lock<std::mutex>(mMutex); } in lock()
89 mutable std::mutex mMutex;
/system/chre/platform/slpi/include/chre/target_platform/
Dcondition_variable_impl.h39 inline void ConditionVariable::wait(Mutex& mutex) { in wait() argument
40 qurt_cond_wait(&mConditionVariable, &mutex.mMutex); in wait()
45 inline bool ConditionVariable::wait_for(Mutex& mutex, Nanoseconds timeout) { in wait_for() argument
71 wait(mutex); in wait_for()
/system/bt/vendor_libs/test_vendor_lib/src/
Dasync_manager.cc103 std::unique_lock<std::mutex> guard(internal_mutex_); in WatchFdForNonBlockingReads()
121 std::unique_lock<std::mutex> guard(internal_mutex_); in StopWatchingFileDescriptor()
145 std::unique_lock<std::mutex> guard(internal_mutex_); in stopThread()
199 std::unique_lock<std::mutex> guard(internal_mutex_); in setUpFileDescriptorSet()
227 std::unique_lock<std::mutex> guard(internal_mutex_); in runAppropriateCallbacks()
268 std::mutex internal_mutex_;
295 std::unique_lock<std::mutex> guard(internal_mutex_); in CancelAsyncTask()
310 std::unique_lock<std::mutex> guard(internal_mutex_); in stopThread()
379 std::unique_lock<std::mutex> guard(internal_mutex_); in scheduleTask()
410 std::unique_lock<std::mutex> guard(internal_mutex_); in tryStartThread()
[all …]
/system/core/adb/daemon/
Dmdns.cpp33 static std::mutex& mdns_lock = *new std::mutex();
65 std::lock_guard<std::mutex> lock(mdns_lock); in setup_mdns_thread()
84 std::lock_guard<std::mutex> lock(mdns_lock); in teardown_mdns()
/system/netd/server/dns/
DDnsTlsQueryMap.cpp28 std::lock_guard<std::mutex> guard(mLock); in recordQuery()
57 std::lock_guard<std::mutex> guard(mLock); in markTried()
65 std::lock_guard<std::mutex> guard(mLock); in cleanup()
104 std::lock_guard<std::mutex> guard(mLock); in getAll()
113 std::lock_guard<std::mutex> guard(mLock); in empty()
118 std::lock_guard<std::mutex> guard(mLock); in clear()
132 std::lock_guard<std::mutex> guard(mLock); in onResponse()
DLockedQueue.h34 std::lock_guard<std::mutex> guard(mLock); in push()
40 std::lock_guard<std::mutex> guard(mLock); in swap()
45 std::mutex mLock;
/system/libhidl/transport/token/1.0/utils/
DHybridInterface.cpp30 std::mutex gTokenManagerLock;
35 std::lock_guard<std::mutex> lock(gTokenManagerLock); in serviceDied()
79 std::lock_guard<std::mutex> lock(gTokenManagerLock); in retrieveHalInterface()
94 std::lock_guard<std::mutex> lock(gTokenManagerLock); in createHalToken()
108 std::lock_guard<std::mutex> lock(gTokenManagerLock); in deleteHalToken()
/system/core/base/
Dquick_exit.cpp27 static auto& quick_exit_mutex = *new std::mutex();
31 std::lock_guard<std::mutex> lock(quick_exit_mutex); in quick_exit()
39 std::lock_guard<std::mutex> lock(quick_exit_mutex); in at_quick_exit()
/system/bt/vendor_libs/linux/interface/
Dasync_fd_watcher.cc43 std::unique_lock<std::mutex> guard(internal_mutex_); in WatchFdForNonBlockingReads()
56 std::unique_lock<std::mutex> guard(timeout_mutex_); in ConfigureTimeout()
96 std::unique_lock<std::mutex> guard(internal_mutex_); in stopThread()
101 std::unique_lock<std::mutex> guard(timeout_mutex_); in stopThread()
156 std::unique_lock<std::mutex> guard(timeout_mutex_); in ThreadRoutine()
175 std::unique_lock<std::mutex> guard(internal_mutex_); in ThreadRoutine()
/system/bt/btif/src/
Dbtif_config.cc117 static std::mutex config_lock; // protects operations on |config|.
124 std::unique_lock<std::mutex> lock(config_lock); in init()
222 std::unique_lock<std::mutex> lock(config_lock); in clean_up()
237 std::unique_lock<std::mutex> lock(config_lock); in btif_config_has_section()
244 std::unique_lock<std::mutex> lock(config_lock); in btif_config_exist()
253 std::unique_lock<std::mutex> lock(config_lock); in btif_config_get_int()
264 std::unique_lock<std::mutex> lock(config_lock); in btif_config_set_int()
275 std::unique_lock<std::mutex> lock(config_lock); in btif_config_get_uint64()
286 std::unique_lock<std::mutex> lock(config_lock); in btif_config_set_uint64()
299 std::unique_lock<std::mutex> lock(config_lock); in btif_config_get_str()
[all …]
/system/core/libmemunreachable/
DSemaphore.h33 std::unique_lock<std::mutex> lk(m_); in Wait()
44 std::lock_guard<std::mutex> lk(m_); in Post()
54 std::mutex m_;

12345678