Searched refs:barrier (Results 1 – 3 of 3) sorted by relevance
/bionic/libc/bionic/ |
D | pthread_barrier.cpp | 87 static inline pthread_barrier_internal_t* __get_internal_barrier(pthread_barrier_t* barrier) { in __get_internal_barrier() argument 88 return reinterpret_cast<pthread_barrier_internal_t*>(barrier); in __get_internal_barrier() 93 pthread_barrier_internal_t* barrier = __get_internal_barrier(barrier_interface); in pthread_barrier_init() local 97 barrier->init_count = count; in pthread_barrier_init() 98 atomic_init(&barrier->state, WAIT); in pthread_barrier_init() 99 atomic_init(&barrier->wait_count, 0); in pthread_barrier_init() 100 barrier->pshared = false; in pthread_barrier_init() 102 barrier->pshared = true; in pthread_barrier_init() 114 pthread_barrier_internal_t* barrier = __get_internal_barrier(barrier_interface); in pthread_barrier_wait() local 120 while(atomic_load_explicit(&barrier->state, memory_order_acquire) == RELEASE) { in pthread_barrier_wait() [all …]
|
/bionic/tests/ |
D | leak_test.cpp | 134 struct thread_data { pthread_barrier_t* barrier; pid_t* tid; } threads[thread_count]; in TEST() member 136 pthread_barrier_t barrier; in TEST() local 137 ASSERT_EQ(pthread_barrier_init(&barrier, nullptr, thread_count + 1), 0); in TEST() 142 threads[i] = {&barrier, &tids[i]}; in TEST() 146 pthread_barrier_wait(data->barrier); in TEST() 154 pthread_barrier_wait(&barrier); in TEST() 155 ASSERT_EQ(pthread_barrier_destroy(&barrier), 0); in TEST()
|
D | pthread_test.cpp | 2661 pthread_barrier_t barrier; member 2680 int result = pthread_barrier_wait(&arg->data->barrier); in BarrierTestHelper() 2701 ASSERT_EQ(0, pthread_barrier_init(&data.barrier, nullptr, data.thread_count)); in TEST() 2714 ASSERT_EQ(0, pthread_barrier_destroy(&data.barrier)); in TEST() 2719 pthread_barrier_t* barrier; member 2724 ASSERT_EQ(0, pthread_barrier_wait(arg->barrier)); in BarrierDestroyTestHelper() 2728 pthread_barrier_t barrier; in TEST() local 2729 ASSERT_EQ(0, pthread_barrier_init(&barrier, nullptr, 2)); in TEST() 2733 arg.barrier = &barrier; in TEST() 2737 ASSERT_EQ(EBUSY, pthread_barrier_destroy(&barrier)); in TEST() [all …]
|