Multithreaded Programming Guide

Destroying a Barrier Attributes Object

The pthread_barrierattr_destroy() function destroys a barrier attributes object. A destroyed attr attributes object can be reinitialized using pthread_barrierattr_init().

After a barrier attributes object has been used to initialize one or more barriers, destroying the object does not affect any previously initialized barrier.

pthread_barrierattr_destroy() Syntax

#include <pthread.h>

int  pthread_barrierattr_destroy(pthread_barrierattr_t *attr);

pthread_barrierattr_destroy() Return Values

pthread_barrierattr_destroy() returns zero after completing successfully. Any other return value indicates that an error occurred. If the following condition occurs, the function fails and returns the corresponding value.


EINVAL

Description:

Indicates that the value of attr was not valid.