-typedef struct
-{
- pthread_mutex_t mutex;
- unsigned threads_busy; // Counter of threads which are busy
- pthread_cond_t threads_done_cv;
-} Barrier;
-
-void Barrier_Init(Barrier * b);
-void Barrier_Enter(Barrier * b);
-void Barrier_Leave(Barrier * b);
-void Barrier_Wait(Barrier * b);