Lines Matching refs:barrier
38 int uv_barrier_init(uv_barrier_t* barrier, unsigned int count) { in uv_barrier_init() argument
42 b = barrier; in uv_barrier_init()
44 if (barrier == NULL || count == 0) in uv_barrier_init()
49 if (barrier == NULL || count == 0) in uv_barrier_init()
71 barrier->b = b; in uv_barrier_init()
85 int uv_barrier_wait(uv_barrier_t* barrier) { in uv_barrier_wait() argument
89 b = barrier; in uv_barrier_wait()
93 if (barrier == NULL || barrier->b == NULL) in uv_barrier_wait()
96 b = barrier->b; in uv_barrier_wait()
123 void uv_barrier_destroy(uv_barrier_t* barrier) { in uv_barrier_destroy() argument
126 b = barrier; in uv_barrier_destroy()
129 b = barrier->b; in uv_barrier_destroy()
146 uv__free(barrier->b); in uv_barrier_destroy()
147 barrier->b = NULL; in uv_barrier_destroy()
153 int uv_barrier_init(uv_barrier_t* barrier, unsigned int count) { in uv_barrier_init() argument
154 return UV__ERR(pthread_barrier_init(barrier, NULL, count)); in uv_barrier_init()
158 int uv_barrier_wait(uv_barrier_t* barrier) { in uv_barrier_wait() argument
161 rc = pthread_barrier_wait(barrier); in uv_barrier_wait()
170 void uv_barrier_destroy(uv_barrier_t* barrier) { in uv_barrier_destroy() argument
171 if (pthread_barrier_destroy(barrier)) in uv_barrier_destroy()