Home
last modified time | relevance | path

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

12345678910>>...12

/system/chre/platform/linux/tests/
Dtask_manager_test.cc39 std::mutex mutex; in TEST() local
44 auto incrementFunc = [&mutex, &condVar, &counter]() { in TEST()
46 std::unique_lock<std::mutex> lock(mutex); in TEST()
59 std::unique_lock<std::mutex> lock(mutex); in TEST()
67 std::mutex mutex; in TEST() local
72 auto incrementFunc = [&mutex, &condVar, &counter]() { in TEST()
74 std::unique_lock<std::mutex> lock(mutex); in TEST()
92 std::unique_lock<std::mutex> lock(mutex); in TEST()
102 std::mutex mutex; in TEST() local
107 auto incrementFunc = [&mutex, &condVar, &counter]() { in TEST()
[all …]
/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/media/audio_utils/tests/
Dgenerate_mutex_order.cpp107 for (auto mutex : mutexes) { in main() local
109 cout << "inline mutex* " << mutex << ";\n"; in main()
111 cout << "inline mutex* " << mutex in main()
115 last = mutex; in main()
123 auto mutex = mutexes[std::size(mutexes) - i - 1]; in main() local
125 cout << "#define EXCLUDES_BELOW_" << mutex << "\n"; in main()
127 cout << "#define EXCLUDES_BELOW_" << mutex in main()
130 cout << "#define EXCLUDES_" << mutex in main()
131 << " \\\n EXCLUDES(android::audio_utils::" << mutex << ")" in main()
132 << " \\\n EXCLUDES_BELOW_" << mutex << "\n\n"; in main()
[all …]
Daudio_mutex_tests.cpp49 inline audio_utils::mutex* cap1;
50 inline audio_utils::mutex* cap2 ACQUIRED_AFTER(cap1);
51 inline audio_utils::mutex* cap3 ACQUIRED_AFTER(cap2);
52 inline audio_utils::mutex* cap4 ACQUIRED_AFTER(cap3);
99 virtual audio_utils::mutex& mutex1() const RETURN_CAPABILITY(cap1) EXCLUDES_BELOW_1 = 0;
100 virtual audio_utils::mutex& mutex2() const RETURN_CAPABILITY(cap2) EXCLUDES_BELOW_2 = 0;
101 virtual audio_utils::mutex& mutex3() const RETURN_CAPABILITY(cap3) EXCLUDES_BELOW_3 = 0;
134 audio_utils::mutex& mutex1() const override RETURN_CAPABILITY(cap1) EXCLUDES_BELOW_1 { in mutex1()
138 audio_utils::mutex& mutex2() const override RETURN_CAPABILITY(cap2) EXCLUDES_BELOW_2 { in mutex2()
142 audio_utils::mutex& mutex3() const override RETURN_CAPABILITY(cap3) EXCLUDES_BELOW_3 { in mutex3()
[all …]
/system/chre/chpp/platform/linux/include/chpp/platform/
Dplatform_mutex.h30 static inline void chppMutexInit(struct ChppMutex *mutex) { in chppMutexInit() argument
31 pthread_mutex_init(&mutex->lock, NULL); in chppMutexInit()
34 static inline void chppMutexDeinit(struct ChppMutex *mutex) { in chppMutexDeinit() argument
35 pthread_mutex_destroy(&mutex->lock); in chppMutexDeinit()
38 static inline void chppMutexLock(struct ChppMutex *mutex) { in chppMutexLock() argument
39 pthread_mutex_lock(&mutex->lock); in chppMutexLock()
42 static inline void chppMutexUnlock(struct ChppMutex *mutex) { in chppMutexUnlock() argument
43 pthread_mutex_unlock(&mutex->lock); in chppMutexUnlock()
Dplatform_condition_variable.h45 struct ChppMutex *mutex) { in chppConditionVariableWait() argument
46 return pthread_cond_wait(&cv->cond, &mutex->lock) == 0; in chppConditionVariableWait()
50 struct ChppConditionVariable *cv, struct ChppMutex *mutex, in chppConditionVariableTimedWait() argument
59 return pthread_cond_timedwait(&cv->cond, &mutex->lock, &now) == 0; in chppConditionVariableTimedWait()
/system/chre/chpp/platform/linux/
Dnotifier.c35 chppMutexInit(&notifier->mutex); in chppPlatformNotifierInit()
41 chppMutexDeinit(&notifier->mutex); in chppPlatformNotifierDeinit()
45 chppMutexLock(&notifier->mutex); in chppPlatformNotifierGetSignal()
50 chppMutexUnlock(&notifier->mutex); in chppPlatformNotifierGetSignal()
55 chppMutexLock(&notifier->mutex); in chppPlatformNotifierWait()
58 pthread_cond_wait(&notifier->cond, &notifier->mutex.lock); in chppPlatformNotifierWait()
63 chppMutexUnlock(&notifier->mutex); in chppPlatformNotifierWait()
77 chppMutexLock(&notifier->mutex); in chppPlatformNotifierTimedWait()
86 pthread_cond_timedwait(&notifier->cond, &notifier->mutex.lock, &absTime); in chppPlatformNotifierTimedWait()
92 chppMutexUnlock(&notifier->mutex); in chppPlatformNotifierTimedWait()
[all …]
/system/chre/platform/zephyr/include/chre/target_platform/
Dcondition_variable_impl.h34 inline void ConditionVariable::wait(Mutex &mutex) { in wait() argument
35 k_condvar_wait(&condvar, &(mutex.mutex), K_FOREVER); in wait()
38 inline bool ConditionVariable::wait_for(Mutex &mutex, Nanoseconds timeout) { in wait_for() argument
39 return (k_condvar_wait(&condvar, &(mutex.mutex), in wait_for()
Dmutex_base_impl.h25 k_mutex_init(&mutex); in Mutex()
31 k_mutex_lock(&mutex, K_FOREVER); in lock()
35 return (k_mutex_lock(&mutex, K_NO_WAIT) == 0); in try_lock()
39 k_mutex_unlock(&mutex); in unlock()
/system/core/fs_mgr/libsnapshot/snapuserd/user-space-merge/
Dsnapuserd_transitions.cpp170 std::lock_guard<std::mutex> lock(lock_); in MonitorMerge()
179 std::lock_guard<std::mutex> lock(lock_); in InitiateMerge()
200 std::unique_lock<std::mutex> lock(lock_); in WaitForMergeBegin()
249 std::lock_guard<std::mutex> lock(lock_); in ReadAheadIOCompleted()
267 std::unique_lock<std::mutex> lock(lock_); in WaitForMergeReady()
290 std::lock_guard<std::mutex> lock(lock_); in NotifyRAForMergeReady()
303 std::lock_guard<std::mutex> lock(lock_); in MergeFailed()
312 std::lock_guard<std::mutex> lock(lock_); in MergeCompleted()
338 std::lock_guard<std::mutex> lock(lock_); in NotifyIOTerminated()
346 std::lock_guard<std::mutex> lock(lock_); in IsIOTerminated()
[all …]
Dhandler_manager.cpp72 std::lock_guard<std::mutex> lock(lock_); in AddHandler()
83 std::lock_guard<std::mutex> lock(lock_); in StartHandler()
113 std::lock_guard<std::mutex> lock(lock_); in DeleteHandler()
151 std::lock_guard<std::mutex> lock(lock_); in RunThread()
187 std::lock_guard<std::mutex> lock(lock_); in InitiateMerge()
197 bool SnapshotHandlerManager::StartMerge(std::lock_guard<std::mutex>* proof_of_lock, in StartMerge()
241 std::lock_guard<std::mutex> lock(lock_); in MonitorMerge()
263 std::lock_guard<std::mutex> lock(lock_); in GetMergeStatus()
274 std::lock_guard<std::mutex> lock(lock_); in GetMergePercentage()
305 std::lock_guard<std::mutex> lock(lock_); in GetVerificationStatus()
[all …]
/system/chre/platform/embos/include/chre/target_platform/
Dcondition_variable_impl.h37 inline void ConditionVariable::wait(Mutex &mutex) { in wait() argument
38 mutex.unlock(); in wait()
40 mutex.lock(); in wait()
43 inline bool ConditionVariable::wait_for(Mutex &mutex, Nanoseconds timeout) { in wait_for() argument
48 mutex.unlock(); in wait_for()
50 mutex.lock(); in wait_for()
/system/media/audio_utils/include/audio_utils/
Dmutex.h119 using mutex = mutex_impl<AudioMutexAttributes>; variable
123 inline mutex* Spatializer_Mutex;
124 inline mutex* AudioPolicyEffects_Mutex
126 inline mutex* EffectHandle_Mutex
128 inline mutex* EffectBase_PolicyMutex
130 inline mutex* AudioPolicyService_Mutex
132 inline mutex* CommandThread_Mutex
134 inline mutex* AudioCommand_Mutex
136 inline mutex* UidPolicy_Mutex
138 inline mutex* AudioFlinger_Mutex
[all …]
/system/chre/chpp/include/chpp/
Dmutex.h42 static void chppMutexInit(struct ChppMutex *mutex);
49 static void chppMutexDeinit(struct ChppMutex *mutex);
56 static void chppMutexLock(struct ChppMutex *mutex);
63 static void chppMutexUnlock(struct ChppMutex *mutex);
/system/media/audio_utils/
Dmutex.cpp38 mutex::stat_array_t& mutex::get_mutex_stat_array() { in get_mutex_stat_array()
46 mutex::thread_registry_t& mutex::get_registry() { in get_registry()
/system/security/keystore2/src/km_compat/
Dkm_compat_service.cpp26 static std::mutex mutex; in addKeyMintDeviceService() local
27 std::lock_guard<std::mutex> lock(mutex); in addKeyMintDeviceService()
/system/chre/platform/tinysys/
Dcondition_variable_base.cc57 void ConditionVariable::wait(Mutex &mutex) { in wait() argument
58 mutex.unlock(); in wait()
60 mutex.lock(); in wait()
66 bool ConditionVariable::wait_for(Mutex &mutex, Nanoseconds timeout) { in wait_for() argument
72 wait(mutex); in wait_for()
/system/chre/platform/linux/include/chre/target_platform/
Dcondition_variable_impl.h32 inline void ConditionVariable::wait(Mutex &mutex) { in wait() argument
33 mConditionVariable.wait(mutex); in wait()
36 inline bool ConditionVariable::wait_for(Mutex &mutex, Nanoseconds timeout) { in wait_for() argument
38 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/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/chre/host/tinysys/hal/
Dtinysys_chre_connection.h76 std::unique_lock<std::mutex> lock(mChrePulseMutex); in waitChreBackOnline()
87 std::unique_lock<std::mutex> lock(mChrePulseMutex); in notifyChreBackOnline()
146 std::unique_lock<std::mutex> lock(mMutex); in emplace()
157 std::unique_lock<std::mutex> lock(mMutex); in pop()
162 std::unique_lock<std::mutex> lock(mMutex); in front()
167 std::unique_lock<std::mutex> lock(mMutex); in waitForMessage()
172 std::mutex mMutex;
216 std::mutex mChrePulseMutex;
/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
65 wait(mutex); in wait_for()
/system/chre/chpp/test/
Dfake_link.cpp32 std::lock_guard<std::mutex> lock(mMutex); in appendTxPacket()
39 std::lock_guard<std::mutex> lock(mMutex); in getTxPacketCount()
44 std::unique_lock<std::mutex> lock(mMutex); in waitForTxPacket()
57 std::lock_guard<std::mutex> lock(mMutex); in popTxPacket()
65 std::lock_guard<std::mutex> lock(mMutex); in reset()
/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;

12345678910>>...12