Multithreaded Programming Guide

Return Values

pthread_mutex_init() 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.


The mutex cannot be reinitialized or modified because it still exists.


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


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