/external/compiler-rt/test/lsan/TestCases/ |
high_allocator_contention.cc | 17 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; variable 21 pthread_mutex_lock(&mutex); 22 while (!go) pthread_cond_wait(&cond, &mutex); 23 pthread_mutex_unlock(&mutex); 43 pthread_mutex_lock(&mutex); 46 pthread_mutex_unlock(&mutex);
|
leak_check_before_thread_started.cc | 11 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; variable 15 // This mutex will never be grabbed. 17 pthread_mutex_lock(&mutex); 19 pthread_mutex_unlock(&mutex); 32 // This mutex is never unlocked by the main thread. 33 pthread_mutex_lock(&mutex);
|
guard-page.c | 12 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; variable 23 pthread_mutex_lock(&mutex); 26 pthread_mutex_unlock(&mutex); 53 pthread_mutex_lock(&mutex); 57 while (!ctxfunc_started) pthread_cond_wait(&cond, &mutex); 58 pthread_mutex_unlock(&mutex);
|
/external/deqp/framework/delibs/dethread/unix/ |
deMutexUnix.c | 21 * \brief Unix implementation of mutex. 32 /* \todo [2009-11-12 pyry] It is quite nasty to allocate mutex structs from heap. */ 40 pthread_mutex_t* mutex = deMalloc(sizeof(pthread_mutex_t)); local 42 if (!mutex) 47 deFree(mutex); 58 deFree(mutex); 69 deFree(mutex); 75 ret = pthread_mutex_init(mutex, &attr); 79 deFree(mutex); 85 return (deMutex)mutex; [all...] |
/external/google-breakpad/src/common/android/testing/ |
pthread_fixes.h | 48 pthread_mutex_t mutex; member in struct:__anon20777::__anon20778 57 pthread_mutex_init(&barrier->mutex, NULL); 63 // Lock the mutex 64 pthread_mutex_lock(&barrier->mutex); 66 // waiters, unlock the mutex, then return PTHREAD_BARRIER_SERIAL_THREAD. 70 pthread_mutex_unlock(&barrier->mutex); 76 pthread_cond_wait(&barrier->cond, &barrier->mutex); 79 pthread_mutex_unlock(&barrier->mutex); 86 pthread_mutex_destroy(&barrier->mutex);
|
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_cancel/ |
1-3.c | 16 * 1. Setup a mutex and lock it in main() 21 * 5. Make the thread block on the locked mutex 22 * 6. Send out a thread cancel request to the new thread, and unlock the mutex allowing the 44 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; /* Mutex */ variable 65 /* Lock the mutex. It should have already been locked in main, so the thread 67 if (pthread_mutex_lock(&mutex) != 0) { 95 /* Lock the mutex */ 96 if (pthread_mutex_lock(&mutex) != 0) { 118 /* Cancel request has been sent, unlock the mutex */ [all...] |
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_cond_destroy/speculative/ |
4-1.c | 26 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; variable 34 rc = pthread_mutex_lock(&mutex); 40 rc = pthread_cond_wait(&cond, &mutex); 46 rc = pthread_mutex_unlock(&mutex);
|
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_timedlock/ |
1-1.c | 9 * locks the mutex object referenced by 'mutex'. If the mutex is 10 * already locked, the calling thread shall block until the mutex becomes 18 * 1. Create a mutex in the main() thread and lock it. 21 * 3. Save the time before and after the thread tried to lock the mutex. 22 * 4. After the thread has ended, main() will compare the times before and after the mutex 40 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; /* The mutex */ variable 42 and after locking the mutex usin [all...] |
4-1.c | 15 * and should return 0 since it will be the only one owning the mutex. 35 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; /* The mutex */ variable 37 and afer locking the mutex using 83 /* This should not block since the mutex is not owned by anyone right now. 85 ret = pthread_mutex_timedlock(&mutex, &timeout); 88 if (pthread_mutex_unlock(&mutex) != 0) { 93 if (pthread_mutex_destroy(&mutex) != 0) {
|
5-3.c | 12 * [ETIMEDOUT] - The timeout expried and the mutex could not be locked. 16 * 1. In main(), lock the mutex then create a thread. 19 * 3. Save the return value of pthread_mutex_timedlock() and cleanup mutex stuff. 39 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; /* The mutex */ variable 41 and afer locking the mutex using 52 /* Lock the mutex before creating the thread. */ 53 if (pthread_mutex_lock(&mutex) != 0) { 71 if (pthread_mutex_unlock(&mutex) != 0) { 76 if (pthread_mutex_destroy(&mutex) != 0) [all...] |
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_mutex_trylock/ |
1-1.c | 9 * is equivalent to pthread_mutex_lock() except that if the mutex object 10 * referenced by 'mutex' is currently locked (by any thread, including the 14 * -- Initilize a mutex object 15 * -- Create a secondary thread and have it lock the mutex 16 * -- Within the main thread, try to lock the mutex using 18 * -- Have the secondary thread unlock the mutex 19 * -- Within the main thread, try to lock the mutex again 32 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; variable 41 /* Create a secondary thread and wait until it has locked the mutex */ 46 /* Trylock the mutex and expect it returns EBUSY * [all...] |
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_setcanceltype/ |
1-2.c | 16 * 1. Setup a mutex and lock it in main() 20 * 5. Make the thread block on the locked mutex 21 * 6. Send out a thread cancel request to the new thread, and unlock the mutex allowing the 43 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; /* Mutex */ variable 64 /* Lock the mutex. It should have already been locked in main, so the thread 66 if (pthread_mutex_lock(&mutex) != 0) { 94 /* Lock the mutex */ 95 if (pthread_mutex_lock(&mutex) != 0) { 117 /* Cancel request has been sent, unlock the mutex */ [all...] |
2-1.c | 12 * 1. Setup a mutex and lock it in main() 16 * 4. Make the thread block on the locked mutex 17 * 5. Send out a thread cancel request to the new thread, and unlock the mutex allowing the 39 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; /* Mutex */ variable 59 /* Lock the mutex. It should have already been locked in main, so the thread 61 if (pthread_mutex_lock(&mutex) != 0) { 89 /* Lock the mutex */ 90 if (pthread_mutex_lock(&mutex) != 0) { 112 /* Cancel request has been sent, unlock the mutex */ [all...] |
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_testcancel/ |
1-1.c | 16 * 1. Setup a mutex and lock it in main() 20 * 5. Make the thread block on the locked mutex 21 * 6. Send out a thread cancel request to the new thread, and unlock the mutex allowing the 43 pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; /* Mutex */ variable 64 /* Lock the mutex. It should have already been locked in main, so the thread 66 if (pthread_mutex_lock(&mutex) != 0) { 94 /* Lock the mutex */ 95 if (pthread_mutex_lock(&mutex) != 0) { 117 /* Cancel request has been sent, unlock the mutex */ [all...] |
/external/tensorflow/tensorflow/core/kernels/ |
training_op_helpers.cc | 20 mutex* GetTrainingVariableMutex(OpKernelContext* ctx, int input) { 36 // Safe to pass duplicates - will only lock each distinct mutex once. If 46 std::vector<mutex*> mutexes; 49 mutex* mutex = GetTrainingVariableMutex(ctx, input); local 50 // Only lock each mutex once if duplicates exist (n^2 but n is 2 or 3). 51 if (std::find(mutexes.begin(), mutexes.end(), mutex) == mutexes.end()) { 53 mutexes.push_back(mutex); 60 mutex* mu = GetTrainingVariableMutex(ctx, input);
|
/external/valgrind/drd/tests/ |
bug-235681.c | 13 pthread_mutex_t mutex; variable 25 rc = pthread_mutex_lock(&mutex); 31 rc = pthread_cond_wait(&cond_var, &mutex); 39 rc = pthread_mutex_unlock(&mutex); 56 rc = pthread_mutex_init(&mutex, NULL); 71 rc = pthread_mutex_lock(&mutex); 82 rc = pthread_mutex_unlock(&mutex);
|
hold_lock.c | 28 pthread_mutex_t mutex; local 45 fprintf(stderr, "Locking mutex ...\n"); 49 pthread_mutex_init(&mutex, &mutexattr); 51 pthread_mutex_lock(&mutex); 53 pthread_mutex_lock(&mutex); 54 pthread_mutex_unlock(&mutex); 55 pthread_mutex_unlock(&mutex); 56 pthread_mutex_destroy(&mutex);
|
/external/valgrind/none/tests/ |
ppoll_alarm.c | 13 static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; variable 19 pthread_mutex_lock(&mutex); 22 pthread_mutex_unlock(&mutex); 44 pthread_mutex_lock(&mutex); 46 pthread_cond_wait(&cond, &mutex); 48 pthread_mutex_unlock(&mutex);
|
pselect_alarm.c | 14 static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; variable 20 pthread_mutex_lock(&mutex); 23 pthread_mutex_unlock(&mutex); 45 pthread_mutex_lock(&mutex); 47 pthread_cond_wait(&cond, &mutex); 49 pthread_mutex_unlock(&mutex);
|
/system/core/adb/ |
adb_utils.h | 21 #include <mutex> 62 std::mutex mutex; member in class:BlockingQueue 69 std::unique_lock<std::mutex> lock(mutex); 80 std::unique_lock<std::mutex> lock(mutex);
|
/device/generic/goldfish/gralloc/ |
gr.h | 46 pthread_mutex_t mutex; member in class:Locker 54 inline Locker() { pthread_mutex_init(&mutex, 0); } 55 inline ~Locker() { pthread_mutex_destroy(&mutex); } 56 inline void lock() { pthread_mutex_lock(&mutex); } 57 inline void unlock() { pthread_mutex_unlock(&mutex); }
|
/device/google/marlin/camera/QCamera2/stack/common/ |
cam_semaphore.h | 42 /* Implement semaphore with mutex and conditional variable. 49 pthread_mutex_t mutex; member in struct:__anon2144 55 pthread_mutex_init(&(s->mutex), NULL); 62 pthread_mutex_lock(&(s->mutex)); 65 pthread_mutex_unlock(&(s->mutex)); 71 pthread_mutex_lock(&(s->mutex)); 73 rc = pthread_cond_wait(&(s->cond), &(s->mutex)); 75 pthread_mutex_unlock(&(s->mutex)); 82 pthread_mutex_lock(&(s->mutex)); 84 rc = pthread_cond_timedwait(&(s->cond), &(s->mutex), abs_timeout) [all...] |
/external/brotli/java/org/brotli/wrapper/dec/ |
BrotliDecoderChannel.java | 21 private final Object mutex = new Object(); field in class:BrotliDecoderChannel 40 synchronized (mutex) { 47 synchronized (mutex) { 54 synchronized (mutex) {
|
/external/fio/ |
gettime-thread.c | 38 struct fio_mutex *mutex; member in struct:gtod_cpu_data 44 struct fio_mutex *mutex = data; local 47 fio_mutex_up(mutex); 65 struct fio_mutex *mutex; local 69 mutex = fio_mutex_init(FIO_MUTEX_LOCKED); 70 if (!mutex) 75 ret = pthread_create(>od_thread, &attr, gtod_thread_main, mutex); 89 fio_mutex_down(mutex); 92 fio_mutex_remove(mutex);
|
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/pthread_barrier_wait/ |
2-1.c | 41 static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; variable 60 pthread_mutex_lock(&mutex); 62 pthread_mutex_unlock(&mutex);
|