![]() |
Flowgrind
Advanced TCP traffic generator
|
Missing pthread barrier implemenation for OS X. More...
#include <config.h>
#include <pthread.h>
#include <errno.h>
#include "fg_definitions.h"
#include "fg_barrier.h"
Go to the source code of this file.
Functions | |
int | pthread_barrier_destroy (pthread_barrier_t *barrier) |
Destroys the barrier referenced by barrier . More... | |
int | pthread_barrier_init (pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned count) |
Allocates resources required to use the barrier referenced by barrier . More... | |
int | pthread_barrier_wait (pthread_barrier_t *barrier) |
Synchronizes participating threads at the barrier referenced by barrier . More... | |
Missing pthread barrier implemenation for OS X.
Definition in file fg_barrier.c.
int pthread_barrier_destroy | ( | pthread_barrier_t * | barrier | ) |
Destroys the barrier referenced by barrier
.
It releases any resources used by the barrier. Subsequent use of the barrier is undefined until the barrier is reinitialized by pthread_barrier_init().
[in] | barrier | barrier that should be initialized |
Definition at line 64 of file fg_barrier.c.
int pthread_barrier_init | ( | pthread_barrier_t * | barrier, |
const pthread_barrierattr_t * | attr, | ||
unsigned | count | ||
) |
Allocates resources required to use the barrier referenced by barrier
.
It initializes the barrier with attributes referenced by attr
. If attr
is NULL, the default barrier attributes are used.
[in] | barrier | barrier that should be initialized |
[in] | attr | NULL, or the attributes attr that barrier should use |
[in] | count | number of threads that must call pthread_barrier_wait() before any of them successfully returns. Value must be greater than zero |
Definition at line 37 of file fg_barrier.c.
int pthread_barrier_wait | ( | pthread_barrier_t * | barrier | ) |
Synchronizes participating threads at the barrier referenced by barrier
.
The calling thread blocks until the required number of threads have called pthread_barrier_wait(), specifying the barrier
.
[in] | barrier | barrier that should be initialized |
Definition at line 80 of file fg_barrier.c.