f_pthread_attr_setstack(attr, stackaddr, ssize)

Purpose

Use this function to set the stack address and stack size attributes in the pthread attribute object attr. The stackaddr argument represents the stack address as an Integer pointer. The stacksize argument is an integer that represents the size of the stack in bytes. When creating a thread using the attribute object attr, the system allocates a minimum stack size of stacksize bytes.

Class

Function

Argument Type and Attributes

attr
TYPE(f_pthread_attr_t), INTENT(INOUT)

stackaddr
Integer pointer, INTENT(IN)

ssize
INTEGER(KIND=register_size)

Result Type and Attributes

INTEGER(4)

Result Value

On successful completion, this function returns 0. Otherwise, this function returns one of the following errors.

EINVAL
The value of one or both of the supplied arguments is invalid.

EACCES
The stack pages specified are not readable by the thread.
IBM Copyright 2003