#include <pthread.h>
#include <unistd.h>
Go to the source code of this file.
Data Structures | |
struct | pthread_brrrattr_t |
pthread_brrr_t attribute structure More... | |
struct | pthread_brrr_t |
pthread_brrr_t structure More... | |
Defines | |
#define | PTHREAD_BRRR_SERIAL_THREAD -1 |
return value for last barrier thread | |
#define | PTHREAD_BRRR_INITIALIZER(count) |
static initializer for pthread_brrr_t | |
Functions | |
int | pthread_brrr_init (pthread_brrr_t *brrr, const pthread_brrrattr_t *attr, const int value) |
initialize pthread_brrr_t structure | |
int | pthread_brrr_destroy (pthread_brrr_t *brrr) |
destroy pthread_brrr_t structure | |
int | pthread_brrr_wait (pthread_brrr_t *brrr) |
to wait until the previously set number of waiters reach this barrier | |
int | pthread_brrr_decrement_np (pthread_brrr_t *brrr) |
to decrement the number of threads to wait for | |
int | pthread_brrr_increment_np (pthread_brrr_t *brrr) |
to increment the number of threads to wait for | |
int | pthread_brrrattr_init (pthread_brrrattr_t *attr) |
initialize pthread_brrr_t attribute structure | |
int | pthread_brrrattr_destroy (pthread_brrrattr_t *attr) |
destroy pthread_brrr_t attribute structure |
A barrier causes the calling thread to wait until a set number of threads reach a point, then those threads may continue.
#define PTHREAD_BRRR_INITIALIZER | ( | count | ) |
Value:
{ PTHREAD_MUTEX_INITIALIZER, \ PTHREAD_COND_INITIALIZER, 0, 0, count }
int pthread_brrr_decrement_np | ( | pthread_brrr_t * | brrr | ) |
to decrement the number of threads to wait for
brrr | pointer to pthread_brrr_t structure |
int pthread_brrr_destroy | ( | pthread_brrr_t * | brrr | ) |
destroy pthread_brrr_t structure
brrr | pointer to pthread_brrr_t structure |
int pthread_brrr_increment_np | ( | pthread_brrr_t * | brrr | ) |
to increment the number of threads to wait for
brrr | pointer to pthread_brrr_t structure |
int pthread_brrr_init | ( | pthread_brrr_t * | brrr, | |
const pthread_brrrattr_t * | attr, | |||
const int | value | |||
) |
initialize pthread_brrr_t structure
brrr | pointer to pthread_brrr_t structure | |
attr | pointer to pthread_brrr_t attribute structure | |
value | number of thread barriers to wait for |
int pthread_brrr_wait | ( | pthread_brrr_t * | brrr | ) |
to wait until the previously set number of waiters reach this barrier
brrr | pointer to pthread_brrr_t structure |
int pthread_brrrattr_destroy | ( | pthread_brrrattr_t * | attr | ) |
destroy pthread_brrr_t attribute structure
attr | pointer to pthread_brrr_t attribute structure |
int pthread_brrrattr_init | ( | pthread_brrrattr_t * | attr | ) |
initialize pthread_brrr_t attribute structure
attr | pointer to pthread_brrr_t attribute structure |