Home | History | Annotate | Download | only in test

Lines Matching defs:mutex

272   pthread_mutex_t* mutex = static_cast<pthread_mutex_t*>(data);
273 pthread_mutex_lock(mutex);
274 pthread_mutex_unlock(mutex);
280 pthread_mutex_t mutex;
284 // TODO(vladl@google.com): turn mutex into internal::Mutex for automatic
286 pthread_mutex_init(&mutex, NULL);
287 pthread_mutex_lock(&mutex);
291 const int status = pthread_create(&thread_id, &attr, &ThreadFunc, &mutex);
295 pthread_mutex_unlock(&mutex);
315 pthread_mutex_destroy(&mutex);
1005 Mutex m;
1013 Mutex m;
1020 explicit AtomicCounterWithMutex(Mutex* mutex) :
1021 value_(0), mutex_(mutex), random_(42) {}
1027 // Locking a mutex puts up a memory barrier, preventing reads and
1030 // We cannot use Mutex and MutexLock here or rely on their memory
1048 Mutex* const mutex_; // Protects value_.
1057 // Tests that the mutex only lets one thread at a time to lock it.
1059 Mutex mutex;
1060 AtomicCounterWithMutex locked_counter(&mutex);
1079 // If the mutex lets more than one thread to increment the counter at a
1120 // protect the write operation under a mutex.