Return Values
pthread_once() returns zero after completing successfully.
Any other return value indicates that an error occurred. When the following
condition occurs, pthread_once() fails and returns the
corresponding value.
-
EINVAL
-
once_control
or init_routine is NULL.