pthread_brrr.h File Reference

pthread_brrr_t are functions that provide a waiting mechanism. More...

#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


Detailed Description

pthread_brrr_t are functions that provide a waiting mechanism.

A barrier causes the calling thread to wait until a set number of threads reach a point, then those threads may continue.

Warning:


Define Documentation

#define PTHREAD_BRRR_INITIALIZER ( count   ) 

Value:

{ PTHREAD_MUTEX_INITIALIZER, \
        PTHREAD_COND_INITIALIZER, 0, 0, count }
static initializer for pthread_brrr_t


Function Documentation

int pthread_brrr_decrement_np ( pthread_brrr_t brrr  ) 

to decrement the number of threads to wait for

Parameters:
brrr pointer to pthread_brrr_t structure
Returns:
0 is returned on success
non-zero error code is returned on failure

int pthread_brrr_destroy ( pthread_brrr_t brrr  ) 

destroy pthread_brrr_t structure

Parameters:
brrr pointer to pthread_brrr_t structure
Returns:
0 is returned on success
non-zero error code is returned on failure

int pthread_brrr_increment_np ( pthread_brrr_t brrr  ) 

to increment the number of threads to wait for

Parameters:
brrr pointer to pthread_brrr_t structure
Returns:
0 is returned on success
non-zero error code is returned on failure

int pthread_brrr_init ( pthread_brrr_t brrr,
const pthread_brrrattr_t attr,
const int  value 
)

initialize pthread_brrr_t structure

Parameters:
brrr pointer to pthread_brrr_t structure
attr pointer to pthread_brrr_t attribute structure
value number of thread barriers to wait for
Returns:
0 is returned on success
non-zero error code is returned on failure

int pthread_brrr_wait ( pthread_brrr_t brrr  ) 

to wait until the previously set number of waiters reach this barrier

Parameters:
brrr pointer to pthread_brrr_t structure
Returns:
0 is returned on success
non-zero error code is returned on failure

int pthread_brrrattr_destroy ( pthread_brrrattr_t attr  ) 

destroy pthread_brrr_t attribute structure

Parameters:
attr pointer to pthread_brrr_t attribute structure
Returns:
0 is returned on success
non-zero error code is returned on failure

int pthread_brrrattr_init ( pthread_brrrattr_t attr  ) 

initialize pthread_brrr_t attribute structure

Parameters:
attr pointer to pthread_brrr_t attribute structure
Returns:
0 is returned on success
non-zero error code is returned on failure


Generated on Tue Apr 24 20:01:36 2007 for libctf by  doxygen 1.5.1