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 | 119 pthread_barrier_t barrier; in TEST() local 121 ASSERT_EQ(pthread_barrier_init(&barrier, nullptr, thread_count + 1), 0); in TEST() 124 struct thread_data { pthread_barrier_t* barrier; pid_t* tid; }; in TEST() member 127 thread_data* td = new thread_data{&barrier, &tids[i]}; in TEST() 131 pthread_barrier_wait(data->barrier); in TEST() 143 pthread_barrier_wait(&barrier); in TEST() 144 ASSERT_EQ(pthread_barrier_destroy(&barrier), 0); in TEST()
|
D | pthread_test.cpp | 1940 pthread_barrier_t barrier; member 1959 int result = pthread_barrier_wait(&arg->data->barrier); in BarrierTestHelper() 1980 ASSERT_EQ(0, pthread_barrier_init(&data.barrier, nullptr, data.thread_count)); in TEST() 1993 ASSERT_EQ(0, pthread_barrier_destroy(&data.barrier)); in TEST() 1998 pthread_barrier_t* barrier; member 2003 ASSERT_EQ(0, pthread_barrier_wait(arg->barrier)); in BarrierDestroyTestHelper() 2007 pthread_barrier_t barrier; in TEST() local 2008 ASSERT_EQ(0, pthread_barrier_init(&barrier, nullptr, 2)); in TEST() 2012 arg.barrier = &barrier; in TEST() 2016 ASSERT_EQ(EBUSY, pthread_barrier_destroy(&barrier)); in TEST() [all …]
|