qthread_feb_barrier_create (size_t max_threads);
qthread_feb_barrier_enter (qt_feb_barrier_t *b);
qthread_feb_barrier_destroy (qt_feb_barrier_t *b);
The qthread_feb_barrier_create() function generates a barrier data structure, which can then be used to wait for max_threads threads to enter the barrier. To enter the barrier, each thread must call qthread_feb_barrier_enter(), which will cause the thread to block until the specified number of threads has entered the same barrier. Once the barrier is no longer needed, it can be deallocated with the qthread_feb_barrier_destroy() function. Instead of destroying and creating a new barrier, barriers may be resized if necessary, using the qthread_feb_barrier_resize() function. The barrier must be empty before resizing.
Table of Contents