Returns zero after completing successfully. Any other returned value indicates that an error occurred. If the following condition occurs, the function fails and returns the corresponding value.
EINVAL
The value returned is less than the value of PTHREAD_STACK_MIN, or exceeds a system-imposed limit.