Lines Matching refs:cond
1472 pthread_cond_t cond; member in pthread_CondWakeupTest
1482 std::function<int (pthread_cond_t* cond, pthread_mutex_t* mutex)> wait_function;
1493 ASSERT_EQ(0, pthread_cond_init(&cond, &attr)); in InitCond()
1498 std::function<int(pthread_cond_t* cond, pthread_mutex_t* mutex)> wait_function) { in StartWaitingThread() argument
1511 std::function<int(pthread_cond_t* cond, pthread_mutex_t* mutex, const timespec* timeout)> in RunTimedTest() argument
1517 StartWaitingThread([&wait_function, &ts](pthread_cond_t* cond, pthread_mutex_t* mutex) { in RunTimedTest() argument
1518 return wait_function(cond, mutex, &ts); in RunTimedTest()
1522 ASSERT_EQ(0, pthread_cond_signal(&cond)); in RunTimedTest()
1525 void RunTimedTest(clockid_t clock, std::function<int(pthread_cond_t* cond, pthread_mutex_t* mutex, in RunTimedTest() argument
1528 RunTimedTest(clock, [clock, &wait_function](pthread_cond_t* cond, pthread_mutex_t* mutex, in RunTimedTest()
1530 return wait_function(cond, mutex, clock, timeout); in RunTimedTest()
1537 ASSERT_EQ(0, pthread_cond_destroy(&cond)); in TearDown()
1546 ASSERT_EQ(0, test->wait_function(&test->cond, &test->mutex)); in WaitThreadFn()
1556 StartWaitingThread([](pthread_cond_t* cond, pthread_mutex_t* mutex) { in TEST_F() argument
1557 return pthread_cond_wait(cond, mutex); in TEST_F()
1560 ASSERT_EQ(0, pthread_cond_signal(&cond)); in TEST_F()
1565 StartWaitingThread([](pthread_cond_t* cond, pthread_mutex_t* mutex) { in TEST_F() argument
1566 return pthread_cond_wait(cond, mutex); in TEST_F()
1569 ASSERT_EQ(0, pthread_cond_broadcast(&cond)); in TEST_F()
1633 pthread_cond_t cond; in pthread_cond_timedwait_timeout_helper() local
1644 ASSERT_EQ(0, pthread_cond_init(&cond, &attr)); in pthread_cond_timedwait_timeout_helper()
1646 ASSERT_EQ(0, pthread_cond_init(&cond, nullptr)); in pthread_cond_timedwait_timeout_helper()
1652 ASSERT_EQ(ETIMEDOUT, wait_function(&cond, &mutex, &ts)); in pthread_cond_timedwait_timeout_helper()
1654 ASSERT_EQ(EINVAL, wait_function(&cond, &mutex, &ts)); in pthread_cond_timedwait_timeout_helper()
1656 ASSERT_EQ(EINVAL, wait_function(&cond, &mutex, &ts)); in pthread_cond_timedwait_timeout_helper()
1659 ASSERT_EQ(ETIMEDOUT, wait_function(&cond, &mutex, &ts)); in pthread_cond_timedwait_timeout_helper()
1705 pthread_cond_t cond = PTHREAD_COND_INITIALIZER; in TEST() local
1708 EXPECT_EQ(EINVAL, pthread_cond_clockwait(&cond, &mutex, CLOCK_PROCESS_CPUTIME_ID, &ts)); in TEST()
2537 pthread_cond_t* cond = reinterpret_cast<pthread_cond_t*>( in TEST() local
2539 ASSERT_EQ(0, pthread_cond_init(cond, nullptr)); in TEST()
2540 ASSERT_EQ(0, pthread_cond_signal(cond)); in TEST()
2541 ASSERT_EQ(0, pthread_cond_broadcast(cond)); in TEST()
2542 ASSERT_EQ(0, pthread_cond_destroy(cond)); in TEST()