Multithreaded Programming Guide

pthread_attr_destroy(3T)

Use pthread_attr_destroy() to remove the storage allocated during initialization. The attribute object becomes invalid.

Prototype:
int	pthread_attr_destroy(pthread_attr_t *tattr);
#include <pthread.h>

pthread_attr_t tattr;
int ret;

/* destroy an attribute */
ret = pthread_attr_destroy(&tattr); 

Return Values

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


EINVAL

Indicates that the value of tattr was not valid.