pthread_cond_destroy Subroutine



Purpose

Deletes a condition variable.

Library

Threads Library (libpthreads.a)

Syntax

#include 

int pthread_cond_destroy (condition)
pthread_cond_t *condition;

Description

The pthread_cond_destroy subroutine deletes the condition variable
condition. After deletion of the condition variable, the condition
parameter is not valid until it is initialized again by a call to
the pthread_cond_init subroutine.

Note:	The pthread.h header file must be the first included file of
each source file using the threads library.

Parameter

condition	Specifies the condition variable to delete.

Return Values

Upon successful completion, 0 is returned. Otherwise, an error code
is returned.

Error Codes

The pthread_cond_destroy subroutine is unsuccessful if the following
is true:

EBUSY	The condition variable condition is referenced by another thread.

EINVAL	The condition parameter is not valid.

Implementation Specifics

This subroutine is part of the Base Operating System (BOS) Runtime.

Related Information

The pthread_cond_init subroutine.

Using Condition Variables.

Threads Library Quick Reference.