Open System Services Porting Guide (G06.29+, H06.06+, J06.03+)

Table 21 Thread Functions With Changes to Return Values Among Other Changes (continued)
Return Values in Standard POSIX ThreadsFunction
pthread_key_create() 0 = successful
EAGAIN The system lacked the necessary resources to
create another thread-specific data key, or the
system-imposed limit on the total number of keys in a
process (PTHREAD_KEYS_MAX) has been exceeded.
ENOMEM Insufficient memory exists to create the key.
pthread_key_delete() 0 = successful
EINVAL The key value is invalid.
pthread_kill() 0 = successful
EINVAL The value of the sig parameter is an invalid or
unsupported signal number.
ESRCH No thread could be found corresponding to that
specified by the given thread ID.
None.pthread_lock_global_np()
pthread_mutexattr_destroy() 0 = successful
EINVAL The value specified by attr is invalid.
pthread_mutexattr_getkind_np() 0 = successful
-1 = error (Check errno for last error, such as EINVAL.)
pthread_mutexattr_ init() 0 = successful
EINVAL The value specified by attr is invalid.
ENOMEM Insufficient memory exists to initialize the mutex
attributes object.
pthread_mutexattr_setkind_np() 0 = successful
-1 = error (Check errno for last error, such as EINVAL.)
pthread_mutex_init() 0 = successful
EAGAIN The system lacked the necessary resources (other
than memory) to initialize another mutex.
EINVAL The value specified by attr is invalid.
ENOMEM Insufficient memory exists to initialize the mutex.
The current thread ID.pthread_self()
pthread_ setcancelstate() 0 = successful
EINVAL The specified state is not
PTHREAD_CANCEL_ENABLE or
PTHREAD_CANCEL_DISABLE.
pthread_ setcanceltype() 0 = successful
EINVAL The specified type is not
PTHREAD_CANCEL_DEFERRED or
PTHREAD_CANCEL_ASYNCHRONOUS.
ENOTSUP An attempt was made to set the cancel type to
PTHREAD_CANCEL_ASYNCHRONOUS.
pthread_ setschedparam() 0 = successful
EINVAL The value specified by policy or one of the
scheduling parameters associated with the scheduling
policy policy is invalid.
ENOTSUP An attempt was made to set the policy or
scheduling parameters to an unsupported value.
ESRCH The value specified by thread does not refer to
an existing thread.
pthread_setspecific() 0 = successful
EINVAL The key value is invalid.
Changed Thread Functions 211