#ifndef PLS_BARRIER_H#define PLS_BARRIER_H#include <pthread.h>/** * Provides standard barrier behaviour. * `count` threads have to call `wait()` before any of the `wait()` calls returns, * thus blocking all threads until everyone reached the barrier. * * PORTABILITY: * Current implementation is based on pthreads. */classbarrier{pthread_barrier_tbarrier_;public:explicitbarrier(unsignedintcount);~barrier();voidwait();};#endif //PLS_BARRIER_H