Home
last modified time | relevance | path

Searched refs:mutex_ (Results 1 – 25 of 126) sorted by relevance

123456

/external/regex-re2/util/
Dmutex.h72 MutexType mutex_;
95 Mutex::Mutex() : mutex_(0) { } in Mutex()
96 Mutex::~Mutex() { assert(mutex_ == 0); } in ~Mutex()
97 void Mutex::Lock() { assert(--mutex_ == -1); } in Lock()
98 void Mutex::Unlock() { assert(mutex_++ == -1); } in Unlock()
99 bool Mutex::TryLock() { if (mutex_) return false; Lock(); return true; } in TryLock()
100 void Mutex::ReaderLock() { assert(++mutex_ > 0); } in ReaderLock()
101 void Mutex::ReaderUnlock() { assert(mutex_-- > 0); } in ReaderUnlock()
108 Mutex::Mutex() { SAFE_PTHREAD(pthread_rwlock_init(&mutex_, NULL)); } in Mutex()
109 Mutex::~Mutex() { SAFE_PTHREAD(pthread_rwlock_destroy(&mutex_)); } in ~Mutex()
[all …]
/external/webrtc/webrtc/system_wrappers/source/
Devent_timer_posix.cc43 pthread_mutex_init(&mutex_, &attr); in EventTimerPosix()
58 pthread_mutex_destroy(&mutex_); in ~EventTimerPosix()
63 RTC_CHECK_EQ(0, pthread_mutex_lock(&mutex_)); in Set()
66 pthread_mutex_unlock(&mutex_); in Set()
72 RTC_CHECK_EQ(0, pthread_mutex_lock(&mutex_)); in Wait()
99 ret_val = pthread_cond_timedwait(&cond_, &mutex_, &end_at); in Wait()
102 ret_val = pthread_cond_wait(&cond_, &mutex_); in Wait()
113 pthread_mutex_unlock(&mutex_); in Wait()
120 RTC_CHECK_EQ(0, pthread_mutex_lock(&mutex_)); in Wait()
123 ret_val = pthread_cond_timedwait(&cond_, &mutex_, end_at); in Wait()
[all …]
Dcritical_section_posix.cc24 (void) pthread_mutex_init(&mutex_, &attr); in CriticalSectionPosix()
28 (void) pthread_mutex_destroy(&mutex_); in ~CriticalSectionPosix()
33 (void) pthread_mutex_lock(&mutex_); in Enter()
38 (void) pthread_mutex_unlock(&mutex_); in Leave()
Dcondition_variable_posix.cc75 pthread_cond_wait(&cond_, &cs->mutex_); in SleepCS()
116 const int res = pthread_cond_timedwait(&cond_, &cs->mutex_, &ts); in SleepCS()
119 pthread_cond_wait(&cond_, &cs->mutex_); in SleepCS()
/external/ceres-solver/internal/ceres/
Dmutex.h176 MutexType mutex_;
204 Mutex::Mutex() : mutex_(0) { } in Mutex()
205 Mutex::~Mutex() { assert(mutex_ == 0); } in ~Mutex()
206 void Mutex::Lock() { assert(--mutex_ == -1); } in Lock()
207 void Mutex::Unlock() { assert(mutex_++ == -1); } in Unlock()
209 bool Mutex::TryLock() { if (mutex_) return false; Lock(); return true; } in TryLock()
211 void Mutex::ReaderLock() { assert(++mutex_ > 0); } in ReaderLock()
212 void Mutex::ReaderUnlock() { assert(mutex_-- > 0); } in ReaderUnlock()
216 Mutex::Mutex() { InitializeCriticalSection(&mutex_); SetIsSafe(); } in Mutex()
217 Mutex::~Mutex() { DeleteCriticalSection(&mutex_); } in ~Mutex()
[all …]
/external/parameter-framework/asio-1.10.6/include/asio/detail/
Dscoped_lock.hpp33 : mutex_(m), in scoped_lock()
40 : mutex_(m) in scoped_lock()
42 mutex_.lock(); in scoped_lock()
50 mutex_.unlock(); in ~scoped_lock()
58 mutex_.lock(); in lock()
68 mutex_.unlock(); in unlock()
82 return mutex_; in mutex()
87 Mutex& mutex_; member in asio::detail::scoped_lock
Dposix_mutex.hpp42 ::pthread_mutex_destroy(&mutex_); // Ignore EBUSY. in ~posix_mutex()
48 (void)::pthread_mutex_lock(&mutex_); // Ignore EINVAL. in lock()
54 (void)::pthread_mutex_unlock(&mutex_); // Ignore EINVAL. in unlock()
59 ::pthread_mutex_t mutex_;
/external/v8/test/unittests/base/platform/
Dcondition-variable-unittest.cc40 LockGuard<Mutex> lock_guard(&mutex_); in Run()
44 cv_.Wait(&mutex_); in Run()
53 Mutex mutex_; member in v8::base::__anon1f600d640111::ThreadWithMutexAndConditionVariable
64 LockGuard<Mutex> lock_guard(&threads[n].mutex_); in TEST()
70 threads[n].cv_.Wait(&threads[n].mutex_); in TEST()
75 LockGuard<Mutex> lock_guard(&threads[n].mutex_); in TEST()
81 LockGuard<Mutex> lock_guard(&threads[n].mutex_); in TEST()
91 LockGuard<Mutex> lock_guard(&threads[n].mutex_); in TEST()
93 threads[n].cv_.Wait(&threads[n].mutex_); in TEST()
101 LockGuard<Mutex> lock_guard(&threads[n].mutex_); in TEST()
[all …]
/external/libvpx/libvpx/vpx_util/
Dvpx_thread.c24 pthread_mutex_t mutex_; member
37 pthread_mutex_lock(&worker->impl_->mutex_); in thread_loop()
39 pthread_cond_wait(&worker->impl_->condition_, &worker->impl_->mutex_); in thread_loop()
49 pthread_mutex_unlock(&worker->impl_->mutex_); in thread_loop()
62 pthread_mutex_lock(&worker->impl_->mutex_); in change_state()
66 pthread_cond_wait(&worker->impl_->condition_, &worker->impl_->mutex_); in change_state()
74 pthread_mutex_unlock(&worker->impl_->mutex_); in change_state()
103 if (pthread_mutex_init(&worker->impl_->mutex_, NULL)) { in reset()
107 pthread_mutex_destroy(&worker->impl_->mutex_); in reset()
110 pthread_mutex_lock(&worker->impl_->mutex_); in reset()
[all …]
/external/webrtc/webrtc/modules/video_processing/
Dvideo_processing_impl.cc110 rtc::CritScope mutex(&mutex_); in Deflickering()
116 rtc::CritScope mutex(&mutex_); in BrightnessDetection()
121 rtc::CritScope mutex(&mutex_); in EnableTemporalDecimation()
127 rtc::CritScope cs(&mutex_); in SetInputFrameResampleMode()
134 rtc::CritScope cs(&mutex_); in SetTargetResolution()
139 rtc::CritScope cs(&mutex_); in SetTargetFramerate()
144 rtc::CritScope cs(&mutex_); in GetDecimatedFrameRate()
149 rtc::CritScope cs(&mutex_); in GetDecimatedWidth()
154 rtc::CritScope cs(&mutex_); in GetDecimatedHeight()
159 rtc::CritScope cs(&mutex_); in EnableDenosing()
[all …]
/external/google-benchmark/src/
Dmutex.h114 void WaitForNotification() const EXCLUDES(mutex_) { in WaitForNotification()
115 MutexLock m_lock(mutex_); in WaitForNotification()
116 auto notified_fn = [this]() REQUIRES(mutex_) { in WaitForNotification()
122 void Notify() EXCLUDES(mutex_) { in Notify()
124 MutexLock lock(mutex_); in Notify()
131 bool HasBeenNotified() const REQUIRES(mutex_) { in HasBeenNotified()
135 mutable Mutex mutex_; variable
137 bool notified_yet_ GUARDED_BY(mutex_);
/external/webp/src/utils/
Dthread.c54 pthread_mutex_t mutex_; member
211 pthread_mutex_lock(&worker->impl_->mutex_); in ThreadLoop()
213 pthread_cond_wait(&worker->impl_->condition_, &worker->impl_->mutex_); in ThreadLoop()
223 pthread_mutex_unlock(&worker->impl_->mutex_); in ThreadLoop()
236 pthread_mutex_lock(&worker->impl_->mutex_); in ChangeState()
240 pthread_cond_wait(&worker->impl_->condition_, &worker->impl_->mutex_); in ChangeState()
248 pthread_mutex_unlock(&worker->impl_->mutex_); in ChangeState()
277 if (pthread_mutex_init(&worker->impl_->mutex_, NULL)) { in Reset()
281 pthread_mutex_destroy(&worker->impl_->mutex_); in Reset()
284 pthread_mutex_lock(&worker->impl_->mutex_); in Reset()
[all …]
/external/opencv3/3rdparty/libwebp/utils/
Dthread.c140 pthread_mutex_lock(&worker->mutex_); in WebPWorkerThreadLoop()
142 pthread_cond_wait(&worker->condition_, &worker->mutex_); in WebPWorkerThreadLoop()
154 pthread_mutex_unlock(&worker->mutex_); in WebPWorkerThreadLoop()
165 pthread_mutex_lock(&worker->mutex_); in WebPWorkerChangeState()
168 pthread_cond_wait(&worker->condition_, &worker->mutex_); in WebPWorkerChangeState()
175 pthread_mutex_unlock(&worker->mutex_); in WebPWorkerChangeState()
200 if (pthread_mutex_init(&worker->mutex_, NULL) || in WebPWorkerReset()
204 pthread_mutex_lock(&worker->mutex_); in WebPWorkerReset()
207 pthread_mutex_unlock(&worker->mutex_); in WebPWorkerReset()
232 pthread_mutex_destroy(&worker->mutex_); in WebPWorkerEnd()
/external/v8/src/
Dfutex-emulation.cc19 base::LazyMutex FutexEmulation::mutex_ = LAZY_MUTEX_INITIALIZER; member in v8::internal::FutexEmulation
33 base::LockGuard<base::Mutex> lock_guard(FutexEmulation::mutex_.Pointer()); in NotifyWake()
84 base::LockGuard<base::Mutex> lock_guard(mutex_.Pointer()); in Wait()
129 mutex_.Pointer()->Unlock(); in Wait()
147 mutex_.Pointer()->Lock(); in Wait()
152 mutex_.Pointer()->Lock(); in Wait()
175 node->cond_.WaitFor(mutex_.Pointer(), time_until_timeout); in Wait()
178 node->cond_.Wait(mutex_.Pointer()); in Wait()
199 base::LockGuard<base::Mutex> lock_guard(mutex_.Pointer()); in Wake()
227 base::LockGuard<base::Mutex> lock_guard(mutex_.Pointer()); in WakeOrRequeue()
[all …]
Dcancelable-task.cc39 base::LockGuard<base::Mutex> guard(&mutex_); in Register()
54 base::LockGuard<base::Mutex> guard(&mutex_); in RemoveFinishedTask()
63 base::LockGuard<base::Mutex> guard(&mutex_); in TryAbort()
86 base::LockGuard<base::Mutex> guard(&mutex_); in CancelAndWait()
109 cancelable_tasks_barrier_.Wait(&mutex_); in CancelAndWait()
/external/webrtc/webrtc/base/
Dcriticalsection.cc24 pthread_mutex_init(&mutex_, &mutex_attribute); in CriticalSection()
35 pthread_mutex_destroy(&mutex_); in ~CriticalSection()
43 pthread_mutex_lock(&mutex_); in Enter()
60 if (pthread_mutex_trylock(&mutex_) != 0) in TryEnter()
85 pthread_mutex_unlock(&mutex_); in Leave()
/external/parameter-framework/asio-1.10.6/include/asio/detail/impl/
Dtask_io_service.ipp86 mutex_(),
98 mutex::scoped_lock lock(mutex_);
117 mutex::scoped_lock lock(mutex_);
139 mutex::scoped_lock lock(mutex_);
161 mutex::scoped_lock lock(mutex_);
179 mutex::scoped_lock lock(mutex_);
208 mutex::scoped_lock lock(mutex_);
222 mutex::scoped_lock lock(mutex_);
228 mutex::scoped_lock lock(mutex_);
234 mutex::scoped_lock lock(mutex_);
[all …]
Dselect_reactor.ipp33 mutex_(),
46 asio::detail::mutex::scoped_lock lock(mutex_);
82 asio::detail::mutex::scoped_lock lock(mutex_);
100 asio::detail::mutex::scoped_lock lock(mutex_);
117 asio::detail::mutex::scoped_lock lock(mutex_);
124 asio::detail::mutex::scoped_lock lock(mutex_);
131 asio::detail::mutex::scoped_lock lock(mutex_);
139 asio::detail::mutex::scoped_lock lock(mutex_);
202 mutex::scoped_lock lock(mutex_);
208 mutex::scoped_lock lock(mutex_);
/external/v8/src/base/platform/
Dmutex.h204 explicit LockGuard(Mutex* mutex) : mutex_(mutex) { mutex_->Lock(); } in LockGuard()
205 ~LockGuard() { mutex_->Unlock(); } in ~LockGuard()
208 Mutex* mutex_;
/external/vulkan-validation-layers/tests/gtest-1.7.0/include/gtest/internal/
Dgtest-port.h1221 GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_init(&mutex_, NULL));
1224 pthread_mutex_destroy(&mutex_);
1230 pthread_mutex_lock(&mutex_);
1232 pthread_mutex_unlock(&mutex_);
1239 pthread_mutex_lock(&mutex_);
1241 pthread_mutex_unlock(&mutex_);
1249 pthread_mutex_t mutex_;
1461 : mutex_(mutex) { mutex_->Lock(); }
1463 ~GTestMutexLock() { mutex_->Unlock(); }
1466 Mutex* const mutex_;
[all …]
/external/v8/src/profiler/
Dsampler.cc352 static void SetUp() { if (!mutex_) mutex_ = new base::Mutex(); } in SetUp()
353 static void TearDown() { delete mutex_; mutex_ = NULL; } in TearDown()
356 base::LockGuard<base::Mutex> lock_guard(mutex_); in IncreaseSamplerCount()
361 base::LockGuard<base::Mutex> lock_guard(mutex_); in DecreaseSamplerCount()
398 static base::Mutex* mutex_; member in v8::internal::SignalHandler
405 base::Mutex* SignalHandler::mutex_ = NULL; member in v8::internal::SignalHandler
577 static void SetUp() { if (!mutex_) mutex_ = new base::Mutex(); } in SetUp()
578 static void TearDown() { delete mutex_; mutex_ = NULL; } in TearDown()
582 base::LockGuard<base::Mutex> lock_guard(mutex_); in AddActiveSampler()
601 base::LockGuard<base::Mutex> lock_guard(mutex_); in RemoveActiveSampler()
[all …]
/external/protobuf/src/google/protobuf/stubs/
Donce_unittest.cc142 MutexLock lock(&mutex_); in CurrentState()
155 Mutex mutex_; member in google::protobuf::__anon715383980111::OnceInitTest
162 MutexLock lock(&mutex_); in Init()
165 mutex_.Unlock(); in Init()
168 mutex_.Lock(); in Init()
/external/google-breakpad/src/testing/gtest/include/gtest/internal/
Dgtest-port.h1113 GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_init(&mutex_, NULL));
1116 pthread_mutex_destroy(&mutex_);
1122 pthread_mutex_lock(&mutex_);
1124 pthread_mutex_unlock(&mutex_);
1131 pthread_mutex_lock(&mutex_);
1133 pthread_mutex_unlock(&mutex_);
1141 pthread_mutex_t mutex_;
1248 GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_lock(&mutex_));
1260 GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_unlock(&mutex_));
1276 pthread_mutex_t mutex_; // The underlying pthread mutex.
[all …]
/external/gtest/include/gtest/internal/
Dgtest-port.h1205 GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_init(&mutex_, NULL));
1208 pthread_mutex_destroy(&mutex_);
1214 pthread_mutex_lock(&mutex_);
1216 pthread_mutex_unlock(&mutex_);
1223 pthread_mutex_lock(&mutex_);
1225 pthread_mutex_unlock(&mutex_);
1233 pthread_mutex_t mutex_;
1340 GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_lock(&mutex_));
1352 GTEST_CHECK_POSIX_SUCCESS_(pthread_mutex_unlock(&mutex_));
1368 pthread_mutex_t mutex_; // The underlying pthread mutex.
[all …]
/external/libvpx/libvpx/vp9/common/
Dvp9_thread_common.c42 pthread_mutex_t *const mutex = &lf_sync->mutex_[r - 1]; in sync_read()
74 mutex_lock(&lf_sync->mutex_[r]); in sync_write()
79 pthread_mutex_unlock(&lf_sync->mutex_[r]); in sync_write()
262 CHECK_MEM_ERROR(cm, lf_sync->mutex_, in vp9_loop_filter_alloc()
263 vpx_malloc(sizeof(*lf_sync->mutex_) * rows)); in vp9_loop_filter_alloc()
264 if (lf_sync->mutex_) { in vp9_loop_filter_alloc()
266 pthread_mutex_init(&lf_sync->mutex_[i], NULL); in vp9_loop_filter_alloc()
297 if (lf_sync->mutex_ != NULL) { in vp9_loop_filter_dealloc()
299 pthread_mutex_destroy(&lf_sync->mutex_[i]); in vp9_loop_filter_dealloc()
301 vpx_free(lf_sync->mutex_); in vp9_loop_filter_dealloc()

123456