Home
last modified time | relevance | path

Searched refs:barrier (Results 1 – 3 of 3) sorted by relevance

/bionic/libc/bionic/
Dpthread_barrier.cpp87 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/
Dleak_test.cpp141 struct thread_data { pthread_barrier_t* barrier; pid_t* tid; } threads[thread_count]; in TEST() member
143 pthread_barrier_t barrier; in TEST() local
144 ASSERT_EQ(pthread_barrier_init(&barrier, nullptr, thread_count + 1), 0); in TEST()
149 threads[i] = {&barrier, &tids[i]}; in TEST()
153 pthread_barrier_wait(data->barrier); in TEST()
161 pthread_barrier_wait(&barrier); in TEST()
162 ASSERT_EQ(pthread_barrier_destroy(&barrier), 0); in TEST()
Dpthread_test.cpp2704 pthread_barrier_t barrier; member
2723 int result = pthread_barrier_wait(&arg->data->barrier); in BarrierTestHelper()
2744 ASSERT_EQ(0, pthread_barrier_init(&data.barrier, nullptr, data.thread_count)); in TEST()
2757 ASSERT_EQ(0, pthread_barrier_destroy(&data.barrier)); in TEST()
2762 pthread_barrier_t* barrier; member
2767 ASSERT_EQ(0, pthread_barrier_wait(arg->barrier)); in BarrierDestroyTestHelper()
2771 pthread_barrier_t barrier; in TEST() local
2772 ASSERT_EQ(0, pthread_barrier_init(&barrier, nullptr, 2)); in TEST()
2776 arg.barrier = &barrier; in TEST()
2780 ASSERT_EQ(EBUSY, pthread_barrier_destroy(&barrier)); in TEST()
[all …]