f_pthread_getspecific(key, arg)

Purpose

This function can be used to retrieve the thread-specific data associated with key. Note that the argument arg is not optional in this function as it will return the thread-specific data. After execution of the procedure, the argument arg holds a pointer to the data, or NULL if there is no data to retrieve. The argument arg must be an Integer pointer, or the result is undefined.

The actual argument arg must be a variable, and consequently eligible as a left-value in an assignment statement. If you pass an array section with vector subscripts to the argument arg, the result is unpredictable.

Class

Function

Argument Type and Attributes

key
TYPE(f_pthread_key_t), INTENT(IN)

arg
Integer pointer, INTENT(OUT)

Result Type and Attributes

INTEGER(4)

Result Value

On successful completion, this function returns 0. Otherwise, this function returns the following error.

EINVAL
The argument key is invalid.
IBM Copyright 2003