Lines Matching refs:m
2056 PthreadMutex m(PTHREAD_MUTEX_NORMAL, protocol); in TestPthreadMutexLockNormal() local
2058 ASSERT_EQ(0, pthread_mutex_lock(&m.lock)); in TestPthreadMutexLockNormal()
2060 ASSERT_EQ(EPERM, UnlockFromAnotherThread(&m.lock)); in TestPthreadMutexLockNormal()
2062 ASSERT_EQ(0, pthread_mutex_unlock(&m.lock)); in TestPthreadMutexLockNormal()
2063 ASSERT_EQ(0, pthread_mutex_trylock(&m.lock)); in TestPthreadMutexLockNormal()
2064 ASSERT_EQ(EBUSY, pthread_mutex_trylock(&m.lock)); in TestPthreadMutexLockNormal()
2065 ASSERT_EQ(0, pthread_mutex_unlock(&m.lock)); in TestPthreadMutexLockNormal()
2069 PthreadMutex m(PTHREAD_MUTEX_ERRORCHECK, protocol); in TestPthreadMutexLockErrorCheck() local
2071 ASSERT_EQ(0, pthread_mutex_lock(&m.lock)); in TestPthreadMutexLockErrorCheck()
2072 ASSERT_EQ(EPERM, UnlockFromAnotherThread(&m.lock)); in TestPthreadMutexLockErrorCheck()
2073 ASSERT_EQ(EDEADLK, pthread_mutex_lock(&m.lock)); in TestPthreadMutexLockErrorCheck()
2074 ASSERT_EQ(0, pthread_mutex_unlock(&m.lock)); in TestPthreadMutexLockErrorCheck()
2075 ASSERT_EQ(0, pthread_mutex_trylock(&m.lock)); in TestPthreadMutexLockErrorCheck()
2077 ASSERT_EQ(EBUSY, pthread_mutex_trylock(&m.lock)); in TestPthreadMutexLockErrorCheck()
2079 ASSERT_EQ(EDEADLK, pthread_mutex_trylock(&m.lock)); in TestPthreadMutexLockErrorCheck()
2081 ASSERT_EQ(0, pthread_mutex_unlock(&m.lock)); in TestPthreadMutexLockErrorCheck()
2082 ASSERT_EQ(EPERM, pthread_mutex_unlock(&m.lock)); in TestPthreadMutexLockErrorCheck()
2086 PthreadMutex m(PTHREAD_MUTEX_RECURSIVE, protocol); in TestPthreadMutexLockRecursive() local
2088 ASSERT_EQ(0, pthread_mutex_lock(&m.lock)); in TestPthreadMutexLockRecursive()
2089 ASSERT_EQ(EPERM, UnlockFromAnotherThread(&m.lock)); in TestPthreadMutexLockRecursive()
2090 ASSERT_EQ(0, pthread_mutex_lock(&m.lock)); in TestPthreadMutexLockRecursive()
2091 ASSERT_EQ(EPERM, UnlockFromAnotherThread(&m.lock)); in TestPthreadMutexLockRecursive()
2092 ASSERT_EQ(0, pthread_mutex_unlock(&m.lock)); in TestPthreadMutexLockRecursive()
2093 ASSERT_EQ(0, pthread_mutex_unlock(&m.lock)); in TestPthreadMutexLockRecursive()
2094 ASSERT_EQ(0, pthread_mutex_trylock(&m.lock)); in TestPthreadMutexLockRecursive()
2095 ASSERT_EQ(0, pthread_mutex_trylock(&m.lock)); in TestPthreadMutexLockRecursive()
2096 ASSERT_EQ(0, pthread_mutex_unlock(&m.lock)); in TestPthreadMutexLockRecursive()
2097 ASSERT_EQ(0, pthread_mutex_unlock(&m.lock)); in TestPthreadMutexLockRecursive()
2098 ASSERT_EQ(EPERM, pthread_mutex_unlock(&m.lock)); in TestPthreadMutexLockRecursive()
2129 for (auto& m : mutexes) { in TEST() local
2130 ASSERT_EQ(0, pthread_mutex_init(&m, &attr)); in TEST()
2132 pthread_mutex_t m; in TEST() local
2133 ASSERT_EQ(ENOMEM, pthread_mutex_init(&m, &attr)); in TEST()
2134 for (auto& m : mutexes) { in TEST() local
2135 ASSERT_EQ(0, pthread_mutex_lock(&m)); in TEST()
2137 for (auto& m : mutexes) { in TEST() local
2138 ASSERT_EQ(0, pthread_mutex_unlock(&m)); in TEST()
2140 for (auto& m : mutexes) { in TEST() local
2141 ASSERT_EQ(0, pthread_mutex_destroy(&m)); in TEST()
2169 PthreadMutex m; member in MutexWakeupHelper
2184 ASSERT_EQ(0, pthread_mutex_lock(&helper->m.lock)); in thread_fn()
2186 ASSERT_EQ(0, pthread_mutex_unlock(&helper->m.lock)); in thread_fn()
2192 explicit MutexWakeupHelper(int mutex_type) : m(mutex_type) { in MutexWakeupHelper()
2196 ASSERT_EQ(0, pthread_mutex_lock(&m.lock)); in test()
2208 ASSERT_EQ(0, pthread_mutex_unlock(&m.lock)); in test()
2251 PthreadMutex m; member in PIMutexWakeupHelper
2269 ASSERT_EQ(0, pthread_mutex_lock(&helper->m.lock)); in thread_fn()
2283 ASSERT_EQ(0, pthread_mutex_unlock(&helper->m.lock)); in thread_fn()
2288 : m(mutex_type, protocol), protocol(protocol), start_thread_m(PTHREAD_MUTEX_NORMAL) { in PIMutexWakeupHelper()
2306 ASSERT_EQ(0, pthread_mutex_lock(&m.lock)); in test()
2309 ASSERT_EQ(0, pthread_mutex_unlock(&m.lock)); in test()
2340 pthread_mutex_t m; in pthread_mutex_timedlock_helper() local
2341 ASSERT_EQ(0, pthread_mutex_init(&m, nullptr)); in pthread_mutex_timedlock_helper()
2344 ASSERT_EQ(0, pthread_mutex_lock(&m)); in pthread_mutex_timedlock_helper()
2348 ASSERT_EQ(ETIMEDOUT, lock_function(&m, &ts)); in pthread_mutex_timedlock_helper()
2350 ASSERT_EQ(EINVAL, lock_function(&m, &ts)); in pthread_mutex_timedlock_helper()
2352 ASSERT_EQ(EINVAL, lock_function(&m, &ts)); in pthread_mutex_timedlock_helper()
2355 ASSERT_EQ(ETIMEDOUT, lock_function(&m, &ts)); in pthread_mutex_timedlock_helper()
2358 ASSERT_EQ(0, pthread_mutex_unlock(&m)); in pthread_mutex_timedlock_helper()
2362 ASSERT_EQ(0, lock_function(&m, &ts)); in pthread_mutex_timedlock_helper()
2364 ASSERT_EQ(0, pthread_mutex_unlock(&m)); in pthread_mutex_timedlock_helper()
2365 ASSERT_EQ(0, pthread_mutex_destroy(&m)); in pthread_mutex_timedlock_helper()
2398 PthreadMutex m(PTHREAD_MUTEX_NORMAL, PTHREAD_PRIO_INHERIT); in pthread_mutex_timedlock_pi_helper() local
2403 ASSERT_EQ(0, lock_function(&m.lock, &ts)); in pthread_mutex_timedlock_pi_helper()
2408 PthreadMutex& m; in pthread_mutex_timedlock_pi_helper() member
2414 .m = m, in pthread_mutex_timedlock_pi_helper()
2422 intptr_t result = args->lock_function(&args->m.lock, &ts); in pthread_mutex_timedlock_pi_helper()
2431 ASSERT_EQ(0, pthread_mutex_unlock(&m.lock)); in pthread_mutex_timedlock_pi_helper()
2473 pthread_mutex_t m; in TEST() local
2474 ASSERT_EQ(0, pthread_mutex_init(&m, nullptr)); in TEST()
2475 ASSERT_EQ(0, pthread_mutex_destroy(&m)); in TEST()
2476 ASSERT_EXIT(pthread_mutex_lock(&m), ::testing::KilledBySignal(SIGABRT), in TEST()
2478 ASSERT_EXIT(pthread_mutex_unlock(&m), ::testing::KilledBySignal(SIGABRT), in TEST()
2480 ASSERT_EXIT(pthread_mutex_trylock(&m), ::testing::KilledBySignal(SIGABRT), in TEST()
2483 ASSERT_EXIT(pthread_mutex_timedlock(&m, &ts), ::testing::KilledBySignal(SIGABRT), in TEST()
2485 ASSERT_EXIT(pthread_mutex_timedlock_monotonic_np(&m, &ts), ::testing::KilledBySignal(SIGABRT), in TEST()
2487 ASSERT_EXIT(pthread_mutex_clocklock(&m, CLOCK_MONOTONIC, &ts), ::testing::KilledBySignal(SIGABRT), in TEST()
2489 ASSERT_EXIT(pthread_mutex_clocklock(&m, CLOCK_REALTIME, &ts), ::testing::KilledBySignal(SIGABRT), in TEST()
2491 ASSERT_EXIT(pthread_mutex_clocklock(&m, CLOCK_PROCESS_CPUTIME_ID, &ts), in TEST()
2494 ASSERT_EXIT(pthread_mutex_destroy(&m), ::testing::KilledBySignal(SIGABRT), in TEST()