PTHREAD_ATTR_SETSTACKSIZE(3P) SysV PTHREAD_ATTR_SETSTACKSIZE(3P)
NAME
pthread_attr_setstacksize - Sets the value of the stack size attribute of
a thread attributes object
SYNOPSIS
#include <pthread.h>
int pthread_attr_setstacksize (attr, stacksize)
pthread_attr_t *attr;
long stacksize;
DESCRIPTION
The pthread_attr_setstacksize function sets the thread stack size
attribute. The stack size attribute specifies the minimum number of
bytes allocated to the thread when it is created. The default stack size
is the maximum stack size allowed on your system.
The attr argument specifies the address of the thread attributes object
to be modified; stacksize specifies the new value for the stack size
attribute (in bytes).
NOTES
This interface is based on draft 4 of the IEEE P1003.4a standard, and
will be changed to conform to the final version.
DIAGNOSTICS
Upon successful completion, a value of 0 (zero) is returned. Otherwise,
-1 is returned and errno is set to indicate the error.
ERRORS
If the pthread_attr_setstacksize function fails, errno may be set to the
following value:
[EINVAL] The value specified by the attr or stacksize argument is
invalid.
SEE ALSO
pthread_attr_create(3P), pthread_attr_getstacksize(3P)