Lines Matching refs:arg

226 static void* IdFn(void* arg) {  in IdFn()  argument
227 return arg; in IdFn()
261 static void* JoinFn(void* arg) { in JoinFn() argument
262 return reinterpret_cast<void*>(pthread_join(reinterpret_cast<pthread_t>(arg), nullptr)); in JoinFn()
366 static void* thread_fn(void* arg) { in thread_fn()
367 TestBug37410* data = reinterpret_cast<TestBug37410*>(arg); in thread_fn()
389 static void* SignalHandlerFn(void* arg) { in SignalHandlerFn() argument
392 return reinterpret_cast<void*>(sigwait64(&wait_set, reinterpret_cast<int*>(arg))); in SignalHandlerFn()
749 static void* GetActualGuardSizeFn(void* arg) { in GetActualGuardSizeFn() argument
752 pthread_attr_getguardsize(&attributes, reinterpret_cast<size_t*>(arg)); in GetActualGuardSizeFn()
764 static void* GetActualStackSizeFn(void* arg) { in GetActualStackSizeFn() argument
767 pthread_attr_getstacksize(&attributes, reinterpret_cast<size_t*>(arg)); in GetActualStackSizeFn()
961 static void pthread_rwlock_wakeup_helper(RwlockWakeupHelperArg* arg) { in pthread_rwlock_wakeup_helper() argument
962 arg->tid = gettid(); in pthread_rwlock_wakeup_helper()
963 ASSERT_EQ(RwlockWakeupHelperArg::LOCK_INITIALIZED, arg->progress); in pthread_rwlock_wakeup_helper()
964 arg->progress = RwlockWakeupHelperArg::LOCK_WAITING; in pthread_rwlock_wakeup_helper()
966 ASSERT_EQ(EBUSY, arg->trylock_function(&arg->lock)); in pthread_rwlock_wakeup_helper()
967 ASSERT_EQ(0, arg->lock_function(&arg->lock)); in pthread_rwlock_wakeup_helper()
968 ASSERT_EQ(RwlockWakeupHelperArg::LOCK_RELEASED, arg->progress); in pthread_rwlock_wakeup_helper()
969 ASSERT_EQ(0, pthread_rwlock_unlock(&arg->lock)); in pthread_rwlock_wakeup_helper()
971 arg->progress = RwlockWakeupHelperArg::LOCK_ACCESSED; in pthread_rwlock_wakeup_helper()
1108 static void pthread_rwlock_wakeup_timeout_helper(RwlockWakeupHelperArg* arg) { in pthread_rwlock_wakeup_timeout_helper() argument
1109 arg->tid = gettid(); in pthread_rwlock_wakeup_timeout_helper()
1110 ASSERT_EQ(RwlockWakeupHelperArg::LOCK_INITIALIZED, arg->progress); in pthread_rwlock_wakeup_timeout_helper()
1111 arg->progress = RwlockWakeupHelperArg::LOCK_WAITING; in pthread_rwlock_wakeup_timeout_helper()
1113 ASSERT_EQ(EBUSY, arg->trylock_function(&arg->lock)); in pthread_rwlock_wakeup_timeout_helper()
1116 ASSERT_EQ(0, clock_gettime(arg->clock, &ts)); in pthread_rwlock_wakeup_timeout_helper()
1117 ASSERT_EQ(ETIMEDOUT, arg->timed_lock_function(&arg->lock, &ts)); in pthread_rwlock_wakeup_timeout_helper()
1119 ASSERT_EQ(EINVAL, arg->timed_lock_function(&arg->lock, &ts)); in pthread_rwlock_wakeup_timeout_helper()
1121 ASSERT_EQ(EINVAL, arg->timed_lock_function(&arg->lock, &ts)); in pthread_rwlock_wakeup_timeout_helper()
1124 ASSERT_EQ(ETIMEDOUT, arg->timed_lock_function(&arg->lock, &ts)); in pthread_rwlock_wakeup_timeout_helper()
1125 ASSERT_EQ(0, clock_gettime(arg->clock, &ts)); in pthread_rwlock_wakeup_timeout_helper()
1127 ASSERT_EQ(ETIMEDOUT, arg->timed_lock_function(&arg->lock, &ts)); in pthread_rwlock_wakeup_timeout_helper()
1128 ASSERT_EQ(RwlockWakeupHelperArg::LOCK_WAITING, arg->progress); in pthread_rwlock_wakeup_timeout_helper()
1129 arg->progress = RwlockWakeupHelperArg::LOCK_TIMEDOUT; in pthread_rwlock_wakeup_timeout_helper()
1294 ThreadArg* arg = new ThreadArg(this, tid); in CreateWriterThread() local
1296 reinterpret_cast<void* (*)(void*)>(WriterThreadFn), arg)); in CreateWriterThread()
1301 ThreadArg* arg = new ThreadArg(this, tid); in CreateReaderThread() local
1303 reinterpret_cast<void* (*)(void*)>(ReaderThreadFn), arg)); in CreateReaderThread()
1319 static void WriterThreadFn(ThreadArg* arg) { in WriterThreadFn() argument
1320 arg->tid = gettid(); in WriterThreadFn()
1322 RwlockKindTestHelper* helper = arg->helper; in WriterThreadFn()
1325 delete arg; in WriterThreadFn()
1328 static void ReaderThreadFn(ThreadArg* arg) { in ReaderThreadFn() argument
1329 arg->tid = gettid(); in ReaderThreadFn()
1331 RwlockKindTestHelper* helper = arg->helper; in ReaderThreadFn()
1334 delete arg; in ReaderThreadFn()
1982 static void* pthread_gettid_np_helper(void* arg) { in pthread_gettid_np_helper() argument
1983 *reinterpret_cast<pid_t*>(arg) = gettid(); in pthread_gettid_np_helper()
2518 auto ThreadFn = [](void* arg) -> void* { in pthread_mutex_timedlock_pi_helper() argument
2519 auto args = static_cast<ThreadArgs*>(arg); in pthread_mutex_timedlock_pi_helper()
2713 extern _Unwind_Reason_Code FrameCounter(_Unwind_Context* ctx, void* arg);
2785 static void BarrierTestHelper(BarrierTestHelperArg* arg) { in BarrierTestHelper() argument
2786 for (size_t i = 0; i < arg->data->iteration_count; ++i) { in BarrierTestHelper()
2787 int result = pthread_barrier_wait(&arg->data->barrier); in BarrierTestHelper()
2789 arg->data->serial_thread_count++; in BarrierTestHelper()
2793 int mask = arg->data->finished_mask.fetch_or(1 << arg->id); in BarrierTestHelper()
2794 mask |= 1 << arg->id; in BarrierTestHelper()
2795 if (mask == ((1 << arg->data->thread_count) - 1)) { in BarrierTestHelper()
2796 ASSERT_EQ(1, arg->data->serial_thread_count); in BarrierTestHelper()
2797 arg->data->finished_iteration_count++; in BarrierTestHelper()
2798 arg->data->finished_mask = 0; in BarrierTestHelper()
2799 arg->data->serial_thread_count = 0; in BarrierTestHelper()
2829 static void BarrierDestroyTestHelper(BarrierDestroyTestArg* arg) { in BarrierDestroyTestHelper() argument
2830 arg->tid = gettid(); in BarrierDestroyTestHelper()
2831 ASSERT_EQ(0, pthread_barrier_wait(arg->barrier)); in BarrierDestroyTestHelper()
2838 BarrierDestroyTestArg arg; in TEST() local
2839 arg.tid = 0; in TEST()
2840 arg.barrier = &barrier; in TEST()
2842 reinterpret_cast<void* (*)(void*)>(BarrierDestroyTestHelper), &arg)); in TEST()
2843 WaitUntilThreadSleep(arg.tid); in TEST()
2861 void BarrierOrderingTestHelper(BarrierOrderingTestHelperArg* arg) { in BarrierOrderingTestHelper() argument
2864 arg->array[arg->id] = i; in BarrierOrderingTestHelper()
2865 int result = pthread_barrier_wait(arg->barrier); in BarrierOrderingTestHelper()
2867 for (size_t j = 0; j < arg->array_length; ++j) { in BarrierOrderingTestHelper()
2868 ASSERT_EQ(i, arg->array[j]); in BarrierOrderingTestHelper()
2870 result = pthread_barrier_wait(arg->barrier); in BarrierOrderingTestHelper()
3086 extern "C" bool android_run_on_all_threads(bool (*func)(void*), void* arg);
3120 ASSERT_TRUE(android_run_on_all_threads([](void* arg) { return arg == nullptr; }, nullptr)); in TEST() argument