pthread_cond_destroy

Destroys the condition variable.

Library:LibC
Classification:POSIX
Service:Synchronization

Syntax

  #include <pthread.h>
   
  int   pthread_cond_destroy (
     pthread_cond_t   *cond);
  

Parameters

cond

(IN) Points to the condition variable to be destroy.

Return Values

If successful, returns 0. Otherwise returns a nonzero error code.

Decimal

Constant

Description

9

EINVAL

The cond parameter is invalid.

62

EBUSY

The condition variable is being used by another thread.

Remarks

The pthread_cond_destory function does not release the memory allocated to the condition variable; however, it does release the memory allocated with the pthread_cond_init function.

To release the memory for the condition variable, use the function paired with the allocate function. For example, if you used malloc to allocate the memory for the condition variable, use free to release the memory.

See Also