24 #ifndef LIBTHREADAR_BARRIER_HPP
25 #define LIBTHREADAR_BARRIER_HPP
97 static std::string used_implementation()
99 #if HAVE_PTHREAD_BARRIER_T
100 return "pthread_barrier_t";
102 return "pthread_cond_t";
108 unsigned int waiting_num;
110 #if HAVE_PTHREAD_BARRIER_T
111 pthread_barrier_t bar;
void wait()
suspend the calling thread waiting for other up to 'num' other thread to call wait too ...
unsigned int get_count() const
return the barrier size
barrier(unsigned int num)
The constructor.
~barrier() noexcept(false)
The destructor.
unsigned int get_waiting_count() const
return the number of thread waiting on the barrier or just released from it
the class barrier allows several threads to synchronize between them
defines the condition class
This is the only namespace used in libthreadar and all symbols provided by libthreadar are member of ...
barrier & operator=(const barrier &ref)=delete
no assignment operator