Lines Matching refs:arg
197 static void* IdFn(void* arg) { in IdFn() argument
198 return arg; in IdFn()
232 static void* JoinFn(void* arg) { in JoinFn() argument
233 return reinterpret_cast<void*>(pthread_join(reinterpret_cast<pthread_t>(arg), nullptr)); in JoinFn()
337 static void* thread_fn(void* arg) { in thread_fn()
338 TestBug37410* data = reinterpret_cast<TestBug37410*>(arg); in thread_fn()
363 static void* SignalHandlerFn(void* arg) { in SignalHandlerFn() argument
366 return reinterpret_cast<void*>(sigwait64(&wait_set, reinterpret_cast<int*>(arg))); in SignalHandlerFn()
723 static void* GetActualGuardSizeFn(void* arg) { in GetActualGuardSizeFn() argument
726 pthread_attr_getguardsize(&attributes, reinterpret_cast<size_t*>(arg)); in GetActualGuardSizeFn()
738 static void* GetActualStackSizeFn(void* arg) { in GetActualStackSizeFn() argument
741 pthread_attr_getstacksize(&attributes, reinterpret_cast<size_t*>(arg)); in GetActualStackSizeFn()
932 static void pthread_rwlock_wakeup_helper(RwlockWakeupHelperArg* arg) { in pthread_rwlock_wakeup_helper() argument
933 arg->tid = gettid(); in pthread_rwlock_wakeup_helper()
934 ASSERT_EQ(RwlockWakeupHelperArg::LOCK_INITIALIZED, arg->progress); in pthread_rwlock_wakeup_helper()
935 arg->progress = RwlockWakeupHelperArg::LOCK_WAITING; in pthread_rwlock_wakeup_helper()
937 ASSERT_EQ(EBUSY, arg->trylock_function(&arg->lock)); in pthread_rwlock_wakeup_helper()
938 ASSERT_EQ(0, arg->lock_function(&arg->lock)); in pthread_rwlock_wakeup_helper()
939 ASSERT_EQ(RwlockWakeupHelperArg::LOCK_RELEASED, arg->progress); in pthread_rwlock_wakeup_helper()
940 ASSERT_EQ(0, pthread_rwlock_unlock(&arg->lock)); in pthread_rwlock_wakeup_helper()
942 arg->progress = RwlockWakeupHelperArg::LOCK_ACCESSED; in pthread_rwlock_wakeup_helper()
1079 static void pthread_rwlock_wakeup_timeout_helper(RwlockWakeupHelperArg* arg) { in pthread_rwlock_wakeup_timeout_helper() argument
1080 arg->tid = gettid(); in pthread_rwlock_wakeup_timeout_helper()
1081 ASSERT_EQ(RwlockWakeupHelperArg::LOCK_INITIALIZED, arg->progress); in pthread_rwlock_wakeup_timeout_helper()
1082 arg->progress = RwlockWakeupHelperArg::LOCK_WAITING; in pthread_rwlock_wakeup_timeout_helper()
1084 ASSERT_EQ(EBUSY, arg->trylock_function(&arg->lock)); in pthread_rwlock_wakeup_timeout_helper()
1087 ASSERT_EQ(0, clock_gettime(arg->clock, &ts)); in pthread_rwlock_wakeup_timeout_helper()
1088 ASSERT_EQ(ETIMEDOUT, arg->timed_lock_function(&arg->lock, &ts)); in pthread_rwlock_wakeup_timeout_helper()
1090 ASSERT_EQ(EINVAL, arg->timed_lock_function(&arg->lock, &ts)); in pthread_rwlock_wakeup_timeout_helper()
1092 ASSERT_EQ(EINVAL, arg->timed_lock_function(&arg->lock, &ts)); in pthread_rwlock_wakeup_timeout_helper()
1095 ASSERT_EQ(ETIMEDOUT, arg->timed_lock_function(&arg->lock, &ts)); in pthread_rwlock_wakeup_timeout_helper()
1096 ASSERT_EQ(0, clock_gettime(arg->clock, &ts)); in pthread_rwlock_wakeup_timeout_helper()
1098 ASSERT_EQ(ETIMEDOUT, arg->timed_lock_function(&arg->lock, &ts)); in pthread_rwlock_wakeup_timeout_helper()
1099 ASSERT_EQ(RwlockWakeupHelperArg::LOCK_WAITING, arg->progress); in pthread_rwlock_wakeup_timeout_helper()
1100 arg->progress = RwlockWakeupHelperArg::LOCK_TIMEDOUT; in pthread_rwlock_wakeup_timeout_helper()
1263 ThreadArg* arg = new ThreadArg(this, tid); in CreateWriterThread() local
1265 reinterpret_cast<void* (*)(void*)>(WriterThreadFn), arg)); in CreateWriterThread()
1270 ThreadArg* arg = new ThreadArg(this, tid); in CreateReaderThread() local
1272 reinterpret_cast<void* (*)(void*)>(ReaderThreadFn), arg)); in CreateReaderThread()
1288 static void WriterThreadFn(ThreadArg* arg) { in WriterThreadFn() argument
1289 arg->tid = gettid(); in WriterThreadFn()
1291 RwlockKindTestHelper* helper = arg->helper; in WriterThreadFn()
1294 delete arg; in WriterThreadFn()
1297 static void ReaderThreadFn(ThreadArg* arg) { in ReaderThreadFn() argument
1298 arg->tid = gettid(); in ReaderThreadFn()
1300 RwlockKindTestHelper* helper = arg->helper; in ReaderThreadFn()
1303 delete arg; in ReaderThreadFn()
1903 static void* pthread_gettid_np_helper(void* arg) { in pthread_gettid_np_helper() argument
1904 *reinterpret_cast<pid_t*>(arg) = gettid(); in pthread_gettid_np_helper()
2417 auto ThreadFn = [](void* arg) -> void* { in pthread_mutex_timedlock_pi_helper() argument
2418 auto args = static_cast<ThreadArgs*>(arg); in pthread_mutex_timedlock_pi_helper()
2606 extern _Unwind_Reason_Code FrameCounter(_Unwind_Context* ctx, void* arg);
2678 static void BarrierTestHelper(BarrierTestHelperArg* arg) { in BarrierTestHelper() argument
2679 for (size_t i = 0; i < arg->data->iteration_count; ++i) { in BarrierTestHelper()
2680 int result = pthread_barrier_wait(&arg->data->barrier); in BarrierTestHelper()
2682 arg->data->serial_thread_count++; in BarrierTestHelper()
2686 int mask = arg->data->finished_mask.fetch_or(1 << arg->id); in BarrierTestHelper()
2687 mask |= 1 << arg->id; in BarrierTestHelper()
2688 if (mask == ((1 << arg->data->thread_count) - 1)) { in BarrierTestHelper()
2689 ASSERT_EQ(1, arg->data->serial_thread_count); in BarrierTestHelper()
2690 arg->data->finished_iteration_count++; in BarrierTestHelper()
2691 arg->data->finished_mask = 0; in BarrierTestHelper()
2692 arg->data->serial_thread_count = 0; in BarrierTestHelper()
2722 static void BarrierDestroyTestHelper(BarrierDestroyTestArg* arg) { in BarrierDestroyTestHelper() argument
2723 arg->tid = gettid(); in BarrierDestroyTestHelper()
2724 ASSERT_EQ(0, pthread_barrier_wait(arg->barrier)); in BarrierDestroyTestHelper()
2731 BarrierDestroyTestArg arg; in TEST() local
2732 arg.tid = 0; in TEST()
2733 arg.barrier = &barrier; in TEST()
2735 reinterpret_cast<void* (*)(void*)>(BarrierDestroyTestHelper), &arg)); in TEST()
2736 WaitUntilThreadSleep(arg.tid); in TEST()
2754 void BarrierOrderingTestHelper(BarrierOrderingTestHelperArg* arg) { in BarrierOrderingTestHelper() argument
2757 arg->array[arg->id] = i; in BarrierOrderingTestHelper()
2758 int result = pthread_barrier_wait(arg->barrier); in BarrierOrderingTestHelper()
2760 for (size_t j = 0; j < arg->array_length; ++j) { in BarrierOrderingTestHelper()
2761 ASSERT_EQ(i, arg->array[j]); in BarrierOrderingTestHelper()
2763 result = pthread_barrier_wait(arg->barrier); in BarrierOrderingTestHelper()