Multithreaded Programming Guide

pthread_cond_init Return Values

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


EINVAL

Description:

The value specified by cattr is invalid.


EBUSY

Description:

The condition variable is being used.


EAGAIN

Description:

The necessary resources are not available.


ENOMEM

Description:

Insufficient memory exists to initialize the condition variable.