• Home
  • Raw
  • Download

Lines Matching refs:helper

1242     RwlockKindTestHelper* helper;  member
1245 ThreadArg(RwlockKindTestHelper* helper, std::atomic<pid_t>& tid) in ThreadArg()
1246 : helper(helper), tid(tid) { } in ThreadArg()
1291 RwlockKindTestHelper* helper = arg->helper; in WriterThreadFn() local
1292 ASSERT_EQ(0, pthread_rwlock_wrlock(&helper->lock)); in WriterThreadFn()
1293 ASSERT_EQ(0, pthread_rwlock_unlock(&helper->lock)); in WriterThreadFn()
1300 RwlockKindTestHelper* helper = arg->helper; in ReaderThreadFn() local
1301 ASSERT_EQ(0, pthread_rwlock_rdlock(&helper->lock)); in ReaderThreadFn()
1302 ASSERT_EQ(0, pthread_rwlock_unlock(&helper->lock)); in ReaderThreadFn()
1308 RwlockKindTestHelper helper(PTHREAD_RWLOCK_PREFER_READER_NP); in TEST() local
1309 ASSERT_EQ(0, pthread_rwlock_rdlock(&helper.lock)); in TEST()
1313 helper.CreateWriterThread(writer_thread, writer_tid); in TEST()
1318 helper.CreateReaderThread(reader_thread, reader_tid); in TEST()
1321 ASSERT_EQ(0, pthread_rwlock_unlock(&helper.lock)); in TEST()
1326 RwlockKindTestHelper helper(PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP); in TEST() local
1327 ASSERT_EQ(0, pthread_rwlock_rdlock(&helper.lock)); in TEST()
1331 helper.CreateWriterThread(writer_thread, writer_tid); in TEST()
1336 helper.CreateReaderThread(reader_thread, reader_tid); in TEST()
1339 ASSERT_EQ(0, pthread_rwlock_unlock(&helper.lock)); in TEST()
2179 static void thread_fn(MutexWakeupHelper* helper) { in thread_fn() argument
2180 helper->tid = gettid(); in thread_fn()
2181 ASSERT_EQ(LOCK_INITIALIZED, helper->progress); in thread_fn()
2182 helper->progress = LOCK_WAITING; in thread_fn()
2184 ASSERT_EQ(0, pthread_mutex_lock(&helper->m.lock)); in thread_fn()
2185 ASSERT_EQ(LOCK_RELEASED, helper->progress); in thread_fn()
2186 ASSERT_EQ(0, pthread_mutex_unlock(&helper->m.lock)); in thread_fn()
2188 helper->progress = LOCK_ACCESSED; in thread_fn()
2216 MutexWakeupHelper helper(PTHREAD_MUTEX_NORMAL); in TEST() local
2217 helper.test(); in TEST()
2221 MutexWakeupHelper helper(PTHREAD_MUTEX_ERRORCHECK); in TEST() local
2222 helper.test(); in TEST()
2226 MutexWakeupHelper helper(PTHREAD_MUTEX_RECURSIVE); in TEST() local
2227 helper.test(); in TEST()
2264 static void thread_fn(PIMutexWakeupHelper* helper) { in thread_fn() argument
2265 helper->child_tid = gettid(); in thread_fn()
2266 ASSERT_EQ(LOCK_INITIALIZED, helper->progress); in thread_fn()
2269 ASSERT_EQ(0, pthread_mutex_lock(&helper->m.lock)); in thread_fn()
2270 helper->progress = LOCK_CHILD_READY; in thread_fn()
2271 ASSERT_EQ(0, pthread_mutex_lock(&helper->start_thread_m.lock)); in thread_fn()
2273 ASSERT_EQ(0, pthread_mutex_unlock(&helper->start_thread_m.lock)); in thread_fn()
2274 WaitUntilThreadSleep(helper->main_tid); in thread_fn()
2275 ASSERT_EQ(LOCK_WAITING, helper->progress); in thread_fn()
2277 if (helper->protocol == PTHREAD_PRIO_INHERIT) { in thread_fn()
2282 helper->progress = LOCK_RELEASED; in thread_fn()
2283 ASSERT_EQ(0, pthread_mutex_unlock(&helper->m.lock)); in thread_fn()
2317 PIMutexWakeupHelper helper(type, protocol); in TEST() local
2318 helper.test(); in TEST()