pthread_barrier fix