Multithreaded Programming Guide

pthread_cond_destroy(3T)

Use pthread_cond_destroy(3T) to destroy any state associated with the condition variable pointed to by cv. (For Solaris threads, see "cond_destroy(3T)".)

Prototype:
int	pthread_cond_destroy(pthread_cond_t *cv);
#include <pthread.h>

pthread_cond_t cv;
int ret;

/* Condition variable is destroyed */
ret = pthread_cond_destroy(&cv); 

Note that the space for storing the condition variable is not freed.

Return Values

pthread_cond_destroy() returns zero after completing successfully. Any other returned value indicates that an error occurred. When any of the following conditions occur, the function fails and returns the corresponding value.


EINVAL

The value specified by cv is invalid.