Multithreaded Programming Guide

Return Values

pthread_mutex_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.


EBUSY

The implementation has detected an attempt to reinitialize the object referenced by mp (a previously initialized, but not yet destroyed mutex).


EINVAL

The mattr attribute value is invalid. The mutex has not been modified.


EFAULT

The address for the mutex pointed at by mp is invalid.