pthread_barrierattr_destroy(), pthread_barrierattr_init()

destroy and initialize the barrier attributes object 

Advanced Realtime Threads


SYNOPSIS

#include <pthread.h>

int pthread_barrierattr_destroy(pthread_barrierattr_t *attr);

int pthread_barrierattr_init(pthread_barrierattr_t *attr);


DESCRIPTION

The pthread_barrierattr_destroy() function destroys the barrier attributes object specified by the attr argument. Once destroyed, you can reinitialize an attributes object with pthread_barrierattr_init(); otherwise, you should avoid using a destroyed attributes object.

The pthread_barrierattr_init() function initializes the specified barrier attributes object (attr) with the default value for all of the attributes.

You should not use pthread_barrierattr_init() with a barrier attributes object that has already been initialized.

After a barrier attributes object has been used to initialize one or more barriers, any function affecting the attributes object (including destruction) will not affect any previously initialized barrier.


PARAMETERS

attr

Points to a barrier attributes object.


RETURN VALUES

When successful, the pthread_barrierattr_destroy() and pthread_barrierattr_init() functions return zero. Otherwise, they return one of the following:

EINVAL 

The attr argument specified in a pthread_barrier_attr() call points to an invalid value.

ENOMEM 

There is not enough memory for the pthread_barrierattr_init() function to initialize the barrier attributes object.


CONFORMANCE

UNIX 03.


MULTITHREAD SAFETY LEVEL

MT-Safe.


PORTING ISSUES

None.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
pthread_barrierattr_getpshared(), pthread_barrierattr_setpshared()


PTC MKS Toolkit 10.4 Documentation Build 39.